From bd7f2f375a0d6dcbe50f220630553afd0f93ff11 Mon Sep 17 00:00:00 2001 From: Yamini Priya Date: Fri, 4 Oct 2024 15:35:25 -0400 Subject: [PATCH 01/13] Added - Support for FC Redundancy Project --- .../core_virtual_circuit_test.go | 2 + .../core/core_virtual_circuit_data_source.go | 6 +++ .../core/core_virtual_circuit_resource.go | 43 +++++++++++++++++++ .../core/core_virtual_circuits_data_source.go | 6 +++ .../docs/d/core_virtual_circuit.html.markdown | 4 ++ .../d/core_virtual_circuits.html.markdown | 4 ++ .../docs/r/core_virtual_circuit.html.markdown | 4 ++ 7 files changed, 69 insertions(+) diff --git a/internal/integrationtest/core_virtual_circuit_test.go b/internal/integrationtest/core_virtual_circuit_test.go index 66040ee8b55..faccdbe5760 100644 --- a/internal/integrationtest/core_virtual_circuit_test.go +++ b/internal/integrationtest/core_virtual_circuit_test.go @@ -654,6 +654,7 @@ func TestCoreVirtualCircuitResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(datasourceName, "virtual_circuits.0.time_created"), resource.TestCheckResourceAttr(datasourceName, "virtual_circuits.0.state", "PROVISIONED"), resource.TestCheckResourceAttr(datasourceName, "virtual_circuits.0.type", "PRIVATE"), + resource.TestCheckResourceAttr(datasourceName, "virtual_circuits.0.virtual_circuit_redundancy_metadata.#", "0"), ), }, // verify singular datasource @@ -690,6 +691,7 @@ func TestCoreVirtualCircuitResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "state", "PROVISIONED"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttr(singularDatasourceName, "type", "PRIVATE"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "virtual_circuit_redundancy_metadata.#"), ), }, // verify resource import diff --git a/internal/service/core/core_virtual_circuit_data_source.go b/internal/service/core/core_virtual_circuit_data_source.go index 855e5bafba6..cf246c30975 100644 --- a/internal/service/core/core_virtual_circuit_data_source.go +++ b/internal/service/core/core_virtual_circuit_data_source.go @@ -161,5 +161,11 @@ func (s *CoreVirtualCircuitDataSourceCrud) SetData() error { s.D.Set("type", s.Res.Type) + if s.Res.VirtualCircuitRedundancyMetadata != nil { + s.D.Set("virtual_circuit_redundancy_metadata", []interface{}{VirtualCircuitRedundancyMetadataToMap(s.Res.VirtualCircuitRedundancyMetadata)}) + } else { + s.D.Set("virtual_circuit_redundancy_metadata", nil) + } + return nil } diff --git a/internal/service/core/core_virtual_circuit_resource.go b/internal/service/core/core_virtual_circuit_resource.go index 9a85c925619..4e6cbe1022a 100644 --- a/internal/service/core/core_virtual_circuit_resource.go +++ b/internal/service/core/core_virtual_circuit_resource.go @@ -240,6 +240,31 @@ func CoreVirtualCircuitResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "virtual_circuit_redundancy_metadata": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "configured_redundancy_level": { + Type: schema.TypeString, + Computed: true, + }, + "ipv4bgp_session_redundancy_status": { + Type: schema.TypeString, + Computed: true, + }, + "ipv6bgp_session_redundancy_status": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, }, } } @@ -826,6 +851,12 @@ func (s *CoreVirtualCircuitResourceCrud) SetData() error { s.D.Set("type", s.Res.Type) + if s.Res.VirtualCircuitRedundancyMetadata != nil { + s.D.Set("virtual_circuit_redundancy_metadata", []interface{}{VirtualCircuitRedundancyMetadataToMap(s.Res.VirtualCircuitRedundancyMetadata)}) + } else { + s.D.Set("virtual_circuit_redundancy_metadata", nil) + } + return nil } @@ -965,6 +996,18 @@ func CrossConnectMappingToMap(obj oci_core.CrossConnectMapping) map[string]inter return result } +func VirtualCircuitRedundancyMetadataToMap(obj *oci_core.VirtualCircuitRedundancyMetadata) map[string]interface{} { + result := map[string]interface{}{} + + result["configured_redundancy_level"] = string(obj.ConfiguredRedundancyLevel) + + result["ipv4bgp_session_redundancy_status"] = string(obj.Ipv4bgpSessionRedundancyStatus) + + result["ipv6bgp_session_redundancy_status"] = string(obj.Ipv6bgpSessionRedundancyStatus) + + return result +} + func publicPrefixesHashCodeForSets(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) diff --git a/internal/service/core/core_virtual_circuits_data_source.go b/internal/service/core/core_virtual_circuits_data_source.go index 8174a842cd7..a3198b73fcd 100644 --- a/internal/service/core/core_virtual_circuits_data_source.go +++ b/internal/service/core/core_virtual_circuits_data_source.go @@ -205,6 +205,12 @@ func (s *CoreVirtualCircuitsDataSourceCrud) SetData() error { virtualCircuit["type"] = r.Type + if r.VirtualCircuitRedundancyMetadata != nil { + virtualCircuit["virtual_circuit_redundancy_metadata"] = []interface{}{VirtualCircuitRedundancyMetadataToMap(r.VirtualCircuitRedundancyMetadata)} + } else { + virtualCircuit["virtual_circuit_redundancy_metadata"] = nil + } + resources = append(resources, virtualCircuit) } diff --git a/website/docs/d/core_virtual_circuit.html.markdown b/website/docs/d/core_virtual_circuit.html.markdown index 73392baea80..8a32b4d8ae3 100644 --- a/website/docs/d/core_virtual_circuit.html.markdown +++ b/website/docs/d/core_virtual_circuit.html.markdown @@ -88,4 +88,8 @@ The following attributes are exported: * `state` - The virtual circuit's current state. For information about the different states, see [FastConnect Overview](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). * `time_created` - The date and time the virtual circuit was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` * `type` - Whether the virtual circuit supports private or public peering. For more information, see [FastConnect Overview](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +* `virtual_circuit_redundancy_metadata` - Redundancy level details of the virtual circuit + * `configured_redundancy_level` - The configured redundancy level of the virtual circuit + * `ipv4bgp_session_redundancy_status` - IPV4 BGP redundancy status indicates if the configured redundancy level is met + * `ipv6bgp_session_redundancy_status` - IPV6 BGP redundancy status indicates if the configured redundancy level is met diff --git a/website/docs/d/core_virtual_circuits.html.markdown b/website/docs/d/core_virtual_circuits.html.markdown index e5eceda8e50..12931d68edb 100644 --- a/website/docs/d/core_virtual_circuits.html.markdown +++ b/website/docs/d/core_virtual_circuits.html.markdown @@ -101,4 +101,8 @@ The following attributes are exported: * `state` - The virtual circuit's current state. For information about the different states, see [FastConnect Overview](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). * `time_created` - The date and time the virtual circuit was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` * `type` - Whether the virtual circuit supports private or public peering. For more information, see [FastConnect Overview](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +* `virtual_circuit_redundancy_metadata` - Redundancy level details of the virtual circuit + * `configured_redundancy_level` - The configured redundancy level of the virtual circuit + * `ipv4bgp_session_redundancy_status` - IPV4 BGP redundancy status indicates if the configured redundancy level is met + * `ipv6bgp_session_redundancy_status` - IPV6 BGP redundancy status indicates if the configured redundancy level is met diff --git a/website/docs/r/core_virtual_circuit.html.markdown b/website/docs/r/core_virtual_circuit.html.markdown index 8cd1eae02b0..942d771c14f 100644 --- a/website/docs/r/core_virtual_circuit.html.markdown +++ b/website/docs/r/core_virtual_circuit.html.markdown @@ -191,6 +191,10 @@ The following attributes are exported: * `state` - The virtual circuit's current state. For information about the different states, see [FastConnect Overview](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). * `time_created` - The date and time the virtual circuit was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z` * `type` - Whether the virtual circuit supports private or public peering. For more information, see [FastConnect Overview](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/fastconnect.htm). +* `virtual_circuit_redundancy_metadata` - Redundancy level details of the virtual circuit + * `configured_redundancy_level` - The configured redundancy level of the virtual circuit + * `ipv4bgp_session_redundancy_status` - IPV4 BGP redundancy status indicates if the configured redundancy level is met + * `ipv6bgp_session_redundancy_status` - IPV6 BGP redundancy status indicates if the configured redundancy level is met ## Timeouts From 661af49f4d670482b3946d16d2b93219c11bfe64 Mon Sep 17 00:00:00 2001 From: Harshita Taparia Date: Wed, 2 Oct 2024 21:47:23 +0530 Subject: [PATCH 02/13] Bug Fix for the ACD Version selection using env variable and vmNetwork should not consider state for calculating hash --- ...ase_dataguard_association_resource_test.go | 106 ------------------ ...nomous_container_database_resource_test.go | 4 +- .../database_maintenance_run_test.go | 2 +- 3 files changed, 3 insertions(+), 109 deletions(-) diff --git a/internal/integrationtest/database_autonomous_container_database_dataguard_association_resource_test.go b/internal/integrationtest/database_autonomous_container_database_dataguard_association_resource_test.go index 24d7d776485..ce159107101 100644 --- a/internal/integrationtest/database_autonomous_container_database_dataguard_association_resource_test.go +++ b/internal/integrationtest/database_autonomous_container_database_dataguard_association_resource_test.go @@ -157,109 +157,3 @@ func TestDatabaseAutonomousContainerDatabaseDataguardAssociationResource_update( }, }) } - -// issue-routing-tag: database/dbaas-atp-d -func TestDatabaseExaccAutonomousContainerDatabaseDataguardAssociationResource_update(t *testing.T) { - - httpreplay.SetScenario("TestDatabaseExaccAutonomousContainerDatabaseDataguardAssociationResource_update") - defer httpreplay.SaveScenario() - - config := acctest.ProviderTestConfig() - - compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") - compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) - - datasourceName := "data.oci_database_autonomous_container_database_dataguard_associations.exacc_test_autonomous_container_database_dataguard_associations" - singularDatasourceName := "data.oci_database_autonomous_container_database_dataguard_association.exacc_test_autonomous_container_database_dataguard_association" - resourceName := "oci_database_autonomous_container_database_dataguard_association.exacc_test_autonomous_container_database_dataguard_association" - acctest.SaveConfigContent("", "", "", t) - - acctest.ResourceTest(t, nil, []resource.TestStep{ - { - Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_database_autonomous_container_database_dataguard_associations", "exacc_test_autonomous_container_database_dataguard_associations", acctest.Optional, acctest.Create, DatabaseExaccAutonomousContainerDatabaseDataguardAssociationDataSourceRepresentation) + - compartmentIdVariableStr + ExaccACDFSFOResourceConfig, - Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_id"), - - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.#"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.autonomous_container_database_id"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.id"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_container_database_dataguard_associations.0.is_automatic_failover_enabled", "true"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.peer_autonomous_container_database_dataguard_association_id"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.peer_autonomous_container_database_id"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.peer_lifecycle_state"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.peer_role"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.protection_mode"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.role"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.state"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_container_database_dataguard_associations.0.time_created"), - ), - }, - // verify singular datasource - { - Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_database_autonomous_container_database_dataguard_associations", "exacc_test_autonomous_container_database_dataguard_associations", acctest.Optional, acctest.Create, DatabaseExaccAutonomousContainerDatabaseDataguardAssociationDataSourceRepresentation) + - acctest.GenerateDataSourceFromRepresentationMap("oci_database_autonomous_container_database_dataguard_association", "exacc_test_autonomous_container_database_dataguard_association", acctest.Optional, acctest.Create, DatabaseAutonomousContainerExaccAutonomousContainerDatabaseDataguardAssociationSingularDataSourceRepresentation) + - compartmentIdVariableStr + ExaccACDFSFOResourceConfig, - Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttrSet(singularDatasourceName, "autonomous_container_database_dataguard_association_id"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "autonomous_container_database_id"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_container_database_dataguard_associations.0.is_automatic_failover_enabled", "true"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_autonomous_container_database_dataguard_association_id"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_autonomous_container_database_id"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_lifecycle_state"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "peer_role"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "protection_mode"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "role"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), - ), - }, - // verify create with optional parameters - { - Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_database_autonomous_container_database_dataguard_associations", "exacc_test_autonomous_container_database_dataguard_associations", acctest.Optional, acctest.Create, DatabaseExaccAutonomousContainerDatabaseDataguardAssociationDataSourceRepresentation) + - acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_container_database_dataguard_association", "exacc_test_autonomous_container_database_dataguard_association", acctest.Optional, acctest.Create, exaccAutonomousContainerDatabaseDataguardAssociationResourceRepresentation) + - compartmentIdVariableStr + ExaccACDFSFOResourceConfig, - Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttrSet(resourceName, "autonomous_container_database_dataguard_association_id"), - resource.TestCheckResourceAttrSet(resourceName, "autonomous_container_database_id"), - - resource.TestCheckResourceAttrSet(resourceName, "id"), - resource.TestCheckResourceAttr(resourceName, "is_automatic_failover_enabled", "true"), - resource.TestCheckResourceAttrSet(resourceName, "peer_autonomous_container_database_dataguard_association_id"), - resource.TestCheckResourceAttrSet(resourceName, "peer_autonomous_container_database_id"), - resource.TestCheckResourceAttrSet(resourceName, "peer_lifecycle_state"), - resource.TestCheckResourceAttrSet(resourceName, "peer_role"), - resource.TestCheckResourceAttrSet(resourceName, "protection_mode"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), - ), - }, - //verify update - { - Config: config + - acctest.GenerateDataSourceFromRepresentationMap("oci_database_autonomous_container_database_dataguard_associations", "exacc_test_autonomous_container_database_dataguard_associations", acctest.Optional, acctest.Create, DatabaseExaccAutonomousContainerDatabaseDataguardAssociationDataSourceRepresentation) + - acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_container_database_dataguard_association", "exacc_test_autonomous_container_database_dataguard_association", acctest.Optional, acctest.Update, exaccAutonomousContainerDatabaseDataguardAssociationResourceRepresentation) + - compartmentIdVariableStr + ExaccACDFSFOResourceConfig, - Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttrSet(resourceName, "autonomous_container_database_dataguard_association_id"), - resource.TestCheckResourceAttrSet(resourceName, "autonomous_container_database_id"), - - resource.TestCheckResourceAttrSet(resourceName, "id"), - resource.TestCheckResourceAttr(resourceName, "is_automatic_failover_enabled", "false"), - resource.TestCheckResourceAttrSet(resourceName, "peer_autonomous_container_database_dataguard_association_id"), - resource.TestCheckResourceAttrSet(resourceName, "peer_autonomous_container_database_id"), - resource.TestCheckResourceAttrSet(resourceName, "peer_lifecycle_state"), - resource.TestCheckResourceAttrSet(resourceName, "peer_role"), - resource.TestCheckResourceAttrSet(resourceName, "protection_mode"), - resource.TestCheckResourceAttrSet(resourceName, "role"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "time_created"), - ), - }, - }) -} diff --git a/internal/integrationtest/database_autonomous_container_database_resource_test.go b/internal/integrationtest/database_autonomous_container_database_resource_test.go index dee4ebfb308..7f80543b734 100644 --- a/internal/integrationtest/database_autonomous_container_database_resource_test.go +++ b/internal/integrationtest/database_autonomous_container_database_resource_test.go @@ -57,7 +57,7 @@ var ( "maintenance_window_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseAutonomousContainerDatabaseMaintenanceWindowDetailsRepresentation}, "service_level_agreement_type": acctest.Representation{RepType: acctest.Optional, Create: `STANDARD`}, "db_name": acctest.Representation{RepType: acctest.Optional, Create: `DBNAME`}, - "db_version": acctest.Representation{RepType: acctest.Required, Create: `19.23.0.1.0`}, + "db_version": acctest.Representation{RepType: acctest.Required, Create: utils.GetEnvSettingWithDefault("exacc_acd_db_version", "19.24.0.1.0")}, "is_dst_file_update_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, } @@ -76,7 +76,7 @@ var ( "maintenance_window_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseAutonomousContainerDatabaseMaintenanceWindowDetailsRepresentation}, "service_level_agreement_type": acctest.Representation{RepType: acctest.Optional, Create: `STANDARD`}, "db_name": acctest.Representation{RepType: acctest.Optional, Create: `DBNAME`}, - "db_version": acctest.Representation{RepType: acctest.Required, Create: `19.22.0.1.0`}, + "db_version": acctest.Representation{RepType: acctest.Required, Create: utils.GetEnvSettingWithDefault("exacc_acd_db_version", "19.22.0.1.0")}, "is_dst_file_update_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, } diff --git a/internal/integrationtest/database_maintenance_run_test.go b/internal/integrationtest/database_maintenance_run_test.go index f550c8b4fd2..b4c840ddd4e 100644 --- a/internal/integrationtest/database_maintenance_run_test.go +++ b/internal/integrationtest/database_maintenance_run_test.go @@ -82,7 +82,7 @@ var ( "maintenance_window_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatabaseAutonomousContainerDatabaseMaintenanceWindowDetailsRepresentation}, "service_level_agreement_type": acctest.Representation{RepType: acctest.Optional, Create: `STANDARD`}, "db_name": acctest.Representation{RepType: acctest.Optional, Create: `DBNAME2`}, - "db_version": acctest.Representation{RepType: acctest.Required, Create: `19.22.0.1.0`}, + "db_version": acctest.Representation{RepType: acctest.Required, Create: utils.GetEnvSettingWithDefault("mr_acd_db_version", "19.22.0.1.0")}, "is_dst_file_update_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, } From f40f4f7c3b05058ea86e1d93f66089fed0b72062 Mon Sep 17 00:00:00 2001 From: PraveenKumar Shanmugam Date: Tue, 15 Oct 2024 20:52:29 +0530 Subject: [PATCH 03/13] Added Support for OCI Data Science Model Store Backup and Retention --- .../integrationtest/datascience_model_test.go | 59 +++- .../datascience_model_data_source.go | 36 ++ .../datascience/datascience_model_resource.go | 333 +++++++++++++++++- .../datascience_models_data_source.go | 8 + .../docs/d/datascience_model.html.markdown | 22 ++ .../docs/d/datascience_models.html.markdown | 22 ++ .../docs/r/datascience_model.html.markdown | 48 +++ 7 files changed, 515 insertions(+), 13 deletions(-) diff --git a/internal/integrationtest/datascience_model_test.go b/internal/integrationtest/datascience_model_test.go index e39f698b44a..e2a49b033b7 100644 --- a/internal/integrationtest/datascience_model_test.go +++ b/internal/integrationtest/datascience_model_test.go @@ -51,19 +51,26 @@ var ( } DatascienceModelRepresentation = map[string]interface{}{ - "artifact_content_length": acctest.Representation{RepType: acctest.Required, Create: `6954`}, - "model_artifact": acctest.Representation{RepType: acctest.Required, Create: `../../examples/datascience/artifact.zip`}, "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "project_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_datascience_project.test_project.id}`}, - "artifact_content_disposition": acctest.Representation{RepType: acctest.Optional, Create: `attachment; filename=tfTestArtifact`}, + "backup_setting": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatascienceModelBackupSettingRepresentation}, "custom_metadata_list": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatascienceModelCustomMetadataListRepresentation}, "defined_metadata_list": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatascienceModelDefinedMetadataListRepresentation}, "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, "display_name": acctest.Representation{RepType: acctest.Optional, Create: `displayName`, Update: `displayName2`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, - "input_schema": acctest.Representation{RepType: acctest.Optional, Create: "{}"}, - "output_schema": acctest.Representation{RepType: acctest.Optional, Create: "{}"}, + "input_schema": acctest.Representation{RepType: acctest.Optional, Create: `inputSchema`}, + "output_schema": acctest.Representation{RepType: acctest.Optional, Create: `outputSchema`}, + "retention_setting": acctest.RepresentationGroup{RepType: acctest.Optional, Group: DatascienceModelRetentionSettingRepresentation}, + "artifact_content_length": acctest.Representation{RepType: acctest.Required, Create: `6954`}, + "model_artifact": acctest.Representation{RepType: acctest.Required, Create: `../../examples/datascience/artifact.zip`}, + "artifact_content_disposition": acctest.Representation{RepType: acctest.Optional, Create: `attachment; filename=tfTestArtifact`}, + } + DatascienceModelBackupSettingRepresentation = map[string]interface{}{ + "backup_region": acctest.Representation{RepType: acctest.Required, Create: `us-phoenix-1`, Update: `us-phoenix-1`}, + "is_backup_enabled": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "customer_notification_type": acctest.Representation{RepType: acctest.Optional, Create: `NONE`, Update: `ALL`}, } DatascienceModelCustomMetadataListRepresentation = map[string]interface{}{ "category": acctest.Representation{RepType: acctest.Optional, Create: `Performance`, Update: `Performance`}, @@ -75,6 +82,11 @@ var ( "key": acctest.Representation{RepType: acctest.Optional, Create: `UseCaseType`, Update: `UseCaseType`}, "value": acctest.Representation{RepType: acctest.Optional, Create: `ner`, Update: `ner`}, } + DatascienceModelRetentionSettingRepresentation = map[string]interface{}{ + "archive_after_days": acctest.Representation{RepType: acctest.Required, Create: `40`, Update: `41`}, + "customer_notification_type": acctest.Representation{RepType: acctest.Optional, Create: `NONE`, Update: `ALL`}, + "delete_after_days": acctest.Representation{RepType: acctest.Optional, Create: `45`, Update: `46`}, + } DatascienceModelResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_datascience_project", "test_project", acctest.Required, acctest.Create, DatascienceProjectRepresentation) + DefinedTagsDependencies @@ -133,6 +145,11 @@ func TestDatascienceModelResource_basic(t *testing.T) { Config: config + compartmentIdVariableStr + DatascienceModelResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model", "test_model", acctest.Optional, acctest.Create, DatascienceModelRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "backup_operation_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.#", "1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.backup_region", "us-phoenix-1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.customer_notification_type", "NONE"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.is_backup_enabled", "true"), resource.TestCheckResourceAttr(resourceName, "artifact_content_length", "6954"), resource.TestCheckResourceAttrSet(resourceName, "artifact_content_md5"), resource.TestCheckResourceAttrSet(resourceName, "artifact_last_modified"), @@ -153,6 +170,12 @@ func TestDatascienceModelResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "input_schema", "{}"), resource.TestCheckResourceAttr(resourceName, "output_schema", "{}"), resource.TestCheckResourceAttrSet(resourceName, "project_id"), + resource.TestCheckResourceAttr(resourceName, "retention_operation_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.#", "1"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.archive_after_days", "40"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.customer_notification_type", "NONE"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.delete_after_days", "45"), + //resource.TestCheckResourceAttr(resourceName, "state", ACTIVE), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -176,6 +199,11 @@ func TestDatascienceModelResource_basic(t *testing.T) { "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, })), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "backup_operation_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.#", "1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.backup_region", "us-phoenix-1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.customer_notification_type", "NONE"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.is_backup_enabled", "true"), resource.TestCheckResourceAttr(resourceName, "artifact_content_length", "6954"), resource.TestCheckResourceAttrSet(resourceName, "artifact_content_md5"), resource.TestCheckResourceAttrSet(resourceName, "artifact_last_modified"), @@ -196,6 +224,12 @@ func TestDatascienceModelResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "input_schema", "{}"), resource.TestCheckResourceAttr(resourceName, "output_schema", "{}"), resource.TestCheckResourceAttrSet(resourceName, "project_id"), + resource.TestCheckResourceAttr(resourceName, "retention_operation_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.#", "1"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.archive_after_days", "10"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.customer_notification_type", "NONE"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.delete_after_days", "10"), + //resource.TestCheckResourceAttr(resourceName, "state", ACTIVE), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -214,6 +248,11 @@ func TestDatascienceModelResource_basic(t *testing.T) { Config: config + compartmentIdVariableStr + DatascienceModelResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_datascience_model", "test_model", acctest.Optional, acctest.Update, DatascienceModelRepresentation), Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "backup_operation_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.#", "1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.backup_region", "us-phoenix-1"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.customer_notification_type", "ALL"), + resource.TestCheckResourceAttr(resourceName, "backup_setting.0.is_backup_enabled", "true"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "custom_metadata_list.#", "1"), resource.TestCheckResourceAttr(resourceName, "custom_metadata_list.0.category", "Performance"), @@ -231,6 +270,12 @@ func TestDatascienceModelResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "input_schema", "{}"), resource.TestCheckResourceAttr(resourceName, "output_schema", "{}"), resource.TestCheckResourceAttrSet(resourceName, "project_id"), + resource.TestCheckResourceAttr(resourceName, "retention_operation_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.#", "1"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.archive_after_days", "11"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.customer_notification_type", "ALL"), + resource.TestCheckResourceAttr(resourceName, "retention_setting.0.delete_after_days", "11"), + //resource.TestCheckResourceAttr(resourceName, "state", ACTIVE), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -255,7 +300,6 @@ func TestDatascienceModelResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(datasourceName, "id"), resource.TestCheckResourceAttrSet(datasourceName, "project_id"), resource.TestCheckResourceAttr(datasourceName, "state", "ACTIVE"), - resource.TestCheckResourceAttr(datasourceName, "models.#", "1"), resource.TestCheckResourceAttr(datasourceName, "models.0.compartment_id", compartmentId), resource.TestCheckResourceAttrSet(datasourceName, "models.0.created_by"), @@ -265,8 +309,11 @@ func TestDatascienceModelResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(datasourceName, "models.0.project_id"), resource.TestCheckResourceAttrSet(datasourceName, "models.0.state"), resource.TestCheckResourceAttrSet(datasourceName, "models.0.time_created"), + resource.TestCheckResourceAttrSet(datasourceName, "models.0.version_id"), + resource.TestCheckResourceAttr(datasourceName, "models.0.version_label", "versionLabel2"), ), }, + // verify resource import { Config: config + DatascienceModelRequiredOnlyResource, diff --git a/internal/service/datascience/datascience_model_data_source.go b/internal/service/datascience/datascience_model_data_source.go index cdfcca107c9..cd76b17f665 100644 --- a/internal/service/datascience/datascience_model_data_source.go +++ b/internal/service/datascience/datascience_model_data_source.go @@ -87,6 +87,18 @@ func (s *DatascienceModelDataSourceCrud) SetData() error { s.D.SetId(*s.Res.Id) + if s.Res.BackupOperationDetails != nil { + s.D.Set("backup_operation_details", []interface{}{BackupOperationDetailsToMap(s.Res.BackupOperationDetails)}) + } else { + s.D.Set("backup_operation_details", nil) + } + + if s.Res.BackupSetting != nil { + s.D.Set("backup_setting", []interface{}{BackupSettingToMap(s.Res.BackupSetting)}) + } else { + s.D.Set("backup_setting", nil) + } + if s.Res.CompartmentId != nil { s.D.Set("compartment_id", *s.Res.CompartmentId) } @@ -141,6 +153,18 @@ func (s *DatascienceModelDataSourceCrud) SetData() error { s.D.Set("input_schema", *s.Res.InputSchema) } + if s.Res.LifecycleDetails != nil { + s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) + } + + if s.Res.ModelVersionSetId != nil { + s.D.Set("model_version_set_id", *s.Res.ModelVersionSetId) + } + + if s.Res.ModelVersionSetName != nil { + s.D.Set("model_version_set_name", *s.Res.ModelVersionSetName) + } + if s.Res.OutputSchema != nil { s.D.Set("output_schema", *s.Res.OutputSchema) } @@ -149,6 +173,18 @@ func (s *DatascienceModelDataSourceCrud) SetData() error { s.D.Set("project_id", *s.Res.ProjectId) } + if s.Res.RetentionOperationDetails != nil { + s.D.Set("retention_operation_details", []interface{}{RetentionOperationDetailsToMap(s.Res.RetentionOperationDetails)}) + } else { + s.D.Set("retention_operation_details", nil) + } + + if s.Res.RetentionSetting != nil { + s.D.Set("retention_setting", []interface{}{RetentionSettingToMap(s.Res.RetentionSetting)}) + } else { + s.D.Set("retention_setting", nil) + } + s.D.Set("state", s.Res.LifecycleState) if s.Res.TimeCreated != nil { diff --git a/internal/service/datascience/datascience_model_resource.go b/internal/service/datascience/datascience_model_resource.go index 4a90f73e256..d50804c98b2 100644 --- a/internal/service/datascience/datascience_model_resource.go +++ b/internal/service/datascience/datascience_model_resource.go @@ -58,6 +58,35 @@ func DatascienceModelResource() *schema.Resource { }, // Optional + "backup_setting": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "backup_region": { + Type: schema.TypeString, + Required: true, + }, + "is_backup_enabled": { + Type: schema.TypeBool, + Required: true, + }, + + // Optional + "customer_notification_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "custom_metadata_list": { Type: schema.TypeList, Optional: true, @@ -87,8 +116,6 @@ func DatascienceModelResource() *schema.Resource { Optional: true, Computed: true, }, - - // Computed }, }, }, @@ -98,9 +125,6 @@ func DatascienceModelResource() *schema.Resource { Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ - // Required - - // Optional "category": { Type: schema.TypeString, Optional: true, @@ -121,8 +145,6 @@ func DatascienceModelResource() *schema.Resource { Optional: true, Computed: true, }, - - // Computed }, }, }, @@ -167,6 +189,34 @@ func DatascienceModelResource() *schema.Resource { Computed: true, ForceNew: true, }, + "retention_setting": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "archive_after_days": { + Type: schema.TypeInt, + Required: true, + }, + + // Optional + "customer_notification_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "delete_after_days": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + }, + }, + }, "state": { Type: schema.TypeString, Optional: true, @@ -179,6 +229,66 @@ func DatascienceModelResource() *schema.Resource { }, // Computed + "backup_operation_details": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "backup_state": { + Type: schema.TypeString, + Computed: true, + }, + "backup_state_details": { + Type: schema.TypeString, + Computed: true, + }, + "time_last_backup": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "lifecycle_details": { + Type: schema.TypeString, + Computed: true, + }, + "model_version_set_name": { + Type: schema.TypeString, + Computed: true, + }, + "retention_operation_details": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "archive_state": { + Type: schema.TypeString, + Computed: true, + }, + "archive_state_details": { + Type: schema.TypeString, + Computed: true, + }, + "delete_state": { + Type: schema.TypeString, + Computed: true, + }, + "delete_state_details": { + Type: schema.TypeString, + Computed: true, + }, + "time_archival_scheduled": { + Type: schema.TypeString, + Computed: true, + }, + "time_deletion_scheduled": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "artifact_content_md5": { Type: schema.TypeString, Computed: true, @@ -333,6 +443,17 @@ func (s *DatascienceModelResourceCrud) DeletedTarget() []string { func (s *DatascienceModelResourceCrud) Create() error { request := oci_datascience.CreateModelRequest{} + if backupSetting, ok := s.D.GetOkExists("backup_setting"); ok { + if tmpList := backupSetting.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "backup_setting", 0) + tmp, err := s.mapToBackupSetting(fieldKeyFormat) + if err != nil { + return err + } + request.BackupSetting = &tmp + } + } + if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok { tmp := compartmentId.(string) request.CompartmentId = &tmp @@ -409,6 +530,22 @@ func (s *DatascienceModelResourceCrud) Create() error { request.ProjectId = &tmp } + if retentionSetting, ok := s.D.GetOkExists("retention_setting"); ok { + if tmpList := retentionSetting.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "retention_setting", 0) + tmp, err := s.mapToRetentionSetting(fieldKeyFormat) + if err != nil { + return err + } + request.RetentionSetting = &tmp + } + } + + if versionLabel, ok := s.D.GetOkExists("version_label"); ok { + tmp := versionLabel.(string) + request.VersionLabel = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "datascience") response, err := s.Client.CreateModel(context.Background(), request) @@ -459,6 +596,17 @@ func (s *DatascienceModelResourceCrud) Update() error { } request := oci_datascience.UpdateModelRequest{} + if backupSetting, ok := s.D.GetOkExists("backup_setting"); ok { + if tmpList := backupSetting.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "backup_setting", 0) + tmp, err := s.mapToBackupSetting(fieldKeyFormat) + if err != nil { + return err + } + request.BackupSetting = &tmp + } + } + if customMetadataList, ok := s.D.GetOkExists("custom_metadata_list"); ok { interfaces := customMetadataList.([]interface{}) tmp := make([]oci_datascience.Metadata, len(interfaces)) @@ -518,6 +666,27 @@ func (s *DatascienceModelResourceCrud) Update() error { tmp := s.D.Id() request.ModelId = &tmp + if modelVersionSetId, ok := s.D.GetOkExists("model_version_set_id"); ok { + tmp := modelVersionSetId.(string) + request.ModelVersionSetId = &tmp + } + + if retentionSetting, ok := s.D.GetOkExists("retention_setting"); ok { + if tmpList := retentionSetting.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "retention_setting", 0) + tmp, err := s.mapToRetentionSetting(fieldKeyFormat) + if err != nil { + return err + } + request.RetentionSetting = &tmp + } + } + + if versionLabel, ok := s.D.GetOkExists("version_label"); ok { + tmp := versionLabel.(string) + request.VersionLabel = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "datascience") response, err := s.Client.UpdateModel(context.Background(), request) @@ -542,6 +711,18 @@ func (s *DatascienceModelResourceCrud) Delete() error { } func (s *DatascienceModelResourceCrud) SetData() error { + if s.Res.BackupOperationDetails != nil { + s.D.Set("backup_operation_details", []interface{}{BackupOperationDetailsToMap(s.Res.BackupOperationDetails)}) + } else { + s.D.Set("backup_operation_details", nil) + } + + if s.Res.BackupSetting != nil { + s.D.Set("backup_setting", []interface{}{BackupSettingToMap(s.Res.BackupSetting)}) + } else { + s.D.Set("backup_setting", nil) + } + if s.Res.CompartmentId != nil { s.D.Set("compartment_id", *s.Res.CompartmentId) } @@ -580,6 +761,18 @@ func (s *DatascienceModelResourceCrud) SetData() error { s.D.Set("input_schema", *s.Res.InputSchema) } + if s.Res.LifecycleDetails != nil { + s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) + } + + if s.Res.ModelVersionSetId != nil { + s.D.Set("model_version_set_id", *s.Res.ModelVersionSetId) + } + + if s.Res.ModelVersionSetName != nil { + s.D.Set("model_version_set_name", *s.Res.ModelVersionSetName) + } + if s.Res.OutputSchema != nil { s.D.Set("output_schema", *s.Res.OutputSchema) } @@ -588,6 +781,18 @@ func (s *DatascienceModelResourceCrud) SetData() error { s.D.Set("project_id", *s.Res.ProjectId) } + if s.Res.RetentionOperationDetails != nil { + s.D.Set("retention_operation_details", []interface{}{RetentionOperationDetailsToMap(s.Res.RetentionOperationDetails)}) + } else { + s.D.Set("retention_operation_details", nil) + } + + if s.Res.RetentionSetting != nil { + s.D.Set("retention_setting", []interface{}{RetentionSettingToMap(s.Res.RetentionSetting)}) + } else { + s.D.Set("retention_setting", nil) + } + s.D.Set("state", s.Res.LifecycleState) if s.Res.TimeCreated != nil { @@ -597,6 +802,58 @@ func (s *DatascienceModelResourceCrud) SetData() error { return s.SetArtifactData() } +func BackupOperationDetailsToMap(obj *oci_datascience.BackupOperationDetails) map[string]interface{} { + result := map[string]interface{}{} + + result["backup_state"] = string(obj.BackupState) + + if obj.BackupStateDetails != nil { + result["backup_state_details"] = string(*obj.BackupStateDetails) + } + + if obj.TimeLastBackup != nil { + result["time_last_backup"] = obj.TimeLastBackup.String() + } + + return result +} + +func (s *DatascienceModelResourceCrud) mapToBackupSetting(fieldKeyFormat string) (oci_datascience.BackupSetting, error) { + result := oci_datascience.BackupSetting{} + + if backupRegion, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "backup_region")); ok { + tmp := backupRegion.(string) + result.BackupRegion = &tmp + } + + if customerNotificationType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "customer_notification_type")); ok { + result.CustomerNotificationType = oci_datascience.ModelSettingCustomerNotificationTypeEnum(customerNotificationType.(string)) + } + + if isBackupEnabled, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "is_backup_enabled")); ok { + tmp := isBackupEnabled.(bool) + result.IsBackupEnabled = &tmp + } + + return result, nil +} + +func BackupSettingToMap(obj *oci_datascience.BackupSetting) map[string]interface{} { + result := map[string]interface{}{} + + if obj.BackupRegion != nil { + result["backup_region"] = string(*obj.BackupRegion) + } + + result["customer_notification_type"] = string(obj.CustomerNotificationType) + + if obj.IsBackupEnabled != nil { + result["is_backup_enabled"] = bool(*obj.IsBackupEnabled) + } + + return result +} + func (s *DatascienceModelResourceCrud) mapToMetadata(fieldKeyFormat string) (oci_datascience.Metadata, error) { result := oci_datascience.Metadata{} @@ -664,6 +921,68 @@ func MetadataToMap(obj oci_datascience.Metadata) map[string]interface{} { return result } +func RetentionOperationDetailsToMap(obj *oci_datascience.RetentionOperationDetails) map[string]interface{} { + result := map[string]interface{}{} + + result["archive_state"] = string(obj.ArchiveState) + + if obj.ArchiveStateDetails != nil { + result["archive_state_details"] = string(*obj.ArchiveStateDetails) + } + + result["delete_state"] = string(obj.DeleteState) + + if obj.DeleteStateDetails != nil { + result["delete_state_details"] = string(*obj.DeleteStateDetails) + } + + if obj.TimeArchivalScheduled != nil { + result["time_archival_scheduled"] = obj.TimeArchivalScheduled.String() + } + + if obj.TimeDeletionScheduled != nil { + result["time_deletion_scheduled"] = obj.TimeDeletionScheduled.String() + } + + return result +} + +func (s *DatascienceModelResourceCrud) mapToRetentionSetting(fieldKeyFormat string) (oci_datascience.RetentionSetting, error) { + result := oci_datascience.RetentionSetting{} + + if archiveAfterDays, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "archive_after_days")); ok { + tmp := archiveAfterDays.(int) + result.ArchiveAfterDays = &tmp + } + + if customerNotificationType, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "customer_notification_type")); ok { + result.CustomerNotificationType = oci_datascience.ModelSettingCustomerNotificationTypeEnum(customerNotificationType.(string)) + } + + if deleteAfterDays, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "delete_after_days")); ok { + tmp := deleteAfterDays.(int) + result.DeleteAfterDays = &tmp + } + + return result, nil +} + +func RetentionSettingToMap(obj *oci_datascience.RetentionSetting) map[string]interface{} { + result := map[string]interface{}{} + + if obj.ArchiveAfterDays != nil { + result["archive_after_days"] = int(*obj.ArchiveAfterDays) + } + + result["customer_notification_type"] = string(obj.CustomerNotificationType) + + if obj.DeleteAfterDays != nil { + result["delete_after_days"] = int(*obj.DeleteAfterDays) + } + + return result +} + func (s *DatascienceModelResourceCrud) updateCompartment(compartment interface{}) error { changeCompartmentRequest := oci_datascience.ChangeModelCompartmentRequest{} diff --git a/internal/service/datascience/datascience_models_data_source.go b/internal/service/datascience/datascience_models_data_source.go index 50bb4780fd1..6f730052fff 100644 --- a/internal/service/datascience/datascience_models_data_source.go +++ b/internal/service/datascience/datascience_models_data_source.go @@ -172,6 +172,14 @@ func (s *DatascienceModelsDataSourceCrud) SetData() error { model["id"] = *r.Id } + if r.LifecycleDetails != nil { + model["lifecycle_details"] = *r.LifecycleDetails + } + + if r.ModelVersionSetId != nil { + model["model_version_set_id"] = *r.ModelVersionSetId + } + if r.ProjectId != nil { model["project_id"] = *r.ProjectId } diff --git a/website/docs/d/datascience_model.html.markdown b/website/docs/d/datascience_model.html.markdown index a0758cf2217..6ce29f30bd0 100644 --- a/website/docs/d/datascience_model.html.markdown +++ b/website/docs/d/datascience_model.html.markdown @@ -32,6 +32,14 @@ The following arguments are supported: The following attributes are exported: +* `backup_operation_details` - Backup operation details of the model. + * `backup_state` - The backup status of the model. + * `backup_state_details` - The backup execution status details of the model. + * `time_last_backup` - The last backup execution time of the model. +* `backup_setting` - Back up setting details of the model. + * `backup_region` - Oracle Cloud Infrastructure backup region for the model. + * `customer_notification_type` - Customer notification on backup success/failure events. + * `is_backup_enabled` - Boolean flag representing whether backup needs to be enabled/disabled for the model. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model's compartment. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the model. * `custom_metadata_list` - An array of custom metadata details for the model. @@ -66,8 +74,22 @@ The following attributes are exported: * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. * `input_schema` - Input schema file content in String format +* `lifecycle_details` - Details about the lifecycle state of the model. +* `model_version_set_id` - The OCID of the model version set that the model is associated to. +* `model_version_set_name` - The name of the model version set that the model is associated to. * `output_schema` - Output schema file content in String format * `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project associated with the model. +* `retention_operation_details` - Retention operation details for the model. + * `archive_state` - The archival status of model. + * `archive_state_details` - The archival state details of the model. + * `delete_state` - The deletion status of the archived model. + * `delete_state_details` - The deletion status details of the archived model. + * `time_archival_scheduled` - The estimated archival time of the model based on the provided retention setting. + * `time_deletion_scheduled` - The estimated deletion time of the model based on the provided retention setting. +* `retention_setting` - Retention setting details of the model. + * `archive_after_days` - Number of days after which the model will be archived. + * `customer_notification_type` - Customer notification options on success/failure of archival, deletion events. + * `delete_after_days` - Number of days after which the archived model will be deleted. * `state` - The state of the model. * `time_created` - The date and time the resource was created in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2019-08-25T21:10:29.41Z diff --git a/website/docs/d/datascience_models.html.markdown b/website/docs/d/datascience_models.html.markdown index d933298e32c..0e3e9dffb14 100644 --- a/website/docs/d/datascience_models.html.markdown +++ b/website/docs/d/datascience_models.html.markdown @@ -51,6 +51,14 @@ The following attributes are exported: The following attributes are exported: +* `backup_operation_details` - Backup operation details of the model. + * `backup_state` - The backup status of the model. + * `backup_state_details` - The backup execution status details of the model. + * `time_last_backup` - The last backup execution time of the model. +* `backup_setting` - Back up setting details of the model. + * `backup_region` - Oracle Cloud Infrastructure backup region for the model. + * `customer_notification_type` - Customer notification on backup success/failure events. + * `is_backup_enabled` - Boolean flag representing whether backup needs to be enabled/disabled for the model. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model's compartment. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the model. * `custom_metadata_list` - An array of custom metadata details for the model. @@ -85,8 +93,22 @@ The following attributes are exported: * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. * `input_schema` - Input schema file content in String format +* `lifecycle_details` - Details about the lifecycle state of the model. +* `model_version_set_id` - The OCID of the model version set that the model is associated to. +* `model_version_set_name` - The name of the model version set that the model is associated to. * `output_schema` - Output schema file content in String format * `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project associated with the model. +* `retention_operation_details` - Retention operation details for the model. + * `archive_state` - The archival status of model. + * `archive_state_details` - The archival state details of the model. + * `delete_state` - The deletion status of the archived model. + * `delete_state_details` - The deletion status details of the archived model. + * `time_archival_scheduled` - The estimated archival time of the model based on the provided retention setting. + * `time_deletion_scheduled` - The estimated deletion time of the model based on the provided retention setting. +* `retention_setting` - Retention setting details of the model. + * `archive_after_days` - Number of days after which the model will be archived. + * `customer_notification_type` - Customer notification options on success/failure of archival, deletion events. + * `delete_after_days` - Number of days after which the archived model will be deleted. * `state` - The state of the model. * `time_created` - The date and time the resource was created in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2019-08-25T21:10:29.41Z diff --git a/website/docs/r/datascience_model.html.markdown b/website/docs/r/datascience_model.html.markdown index f97c207dfcd..2dfba0ae7d0 100644 --- a/website/docs/r/datascience_model.html.markdown +++ b/website/docs/r/datascience_model.html.markdown @@ -21,6 +21,14 @@ resource "oci_datascience_model" "test_model" { project_id = oci_datascience_project.test_project.id #Optional + backup_setting { + #Required + backup_region = var.model_backup_setting_backup_region + is_backup_enabled = var.model_backup_setting_is_backup_enabled + + #Optional + customer_notification_type = var.model_backup_setting_customer_notification_type + } custom_metadata_list { #Optional @@ -43,6 +51,15 @@ resource "oci_datascience_model" "test_model" { freeform_tags = {"Department"= "Finance"} input_schema = var.model_input_schema output_schema = var.model_output_schema + retention_setting { + #Required + archive_after_days = var.model_retention_setting_archive_after_days + + #Optional + customer_notification_type = var.model_retention_setting_customer_notification_type + delete_after_days = var.model_retention_setting_delete_after_days + } + version_label = var.model_version_label } ``` @@ -50,6 +67,10 @@ resource "oci_datascience_model" "test_model" { The following arguments are supported: +* `backup_setting` - (Optional) (Updatable) Back up setting details of the model. + * `backup_region` - (Required) (Updatable) Oracle Cloud Infrastructure backup region for the model. + * `customer_notification_type` - (Optional) (Updatable) Customer notification on backup success/failure events. + * `is_backup_enabled` - (Required) (Updatable) Boolean flag representing whether backup needs to be enabled/disabled for the model. * `compartment_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment to create the model in. * `custom_metadata_list` - (Optional) (Updatable) An array of custom metadata details for the model. * `category` - (Optional) (Updatable) Category of model metadata which should be null for defined metadata.For custom metadata is should be one of the following values "Performance,Training Profile,Training and Validation Datasets,Training Environment,other". @@ -84,6 +105,11 @@ The following arguments are supported: * `input_schema` - (Optional) Input schema file content in String format * `output_schema` - (Optional) Output schema file content in String format * `project_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project to associate with the model. +* `retention_setting` - (Optional) (Updatable) Retention setting details of the model. + * `archive_after_days` - (Required) (Updatable) Number of days after which the model will be archived. + * `customer_notification_type` - (Optional) (Updatable) Customer notification options on success/failure of archival, deletion events. + * `delete_after_days` - (Optional) (Updatable) Number of days after which the archived model will be deleted. +* `version_label` - (Optional) (Updatable) The version label can add an additional description of the lifecycle state of the model or the application using/training the model. * `model_artifact` - (Optional) The model artifact to upload. It is a ZIP archive of the files necessary to run the model. This can be done in a separate step or using cli/sdk. The Model will remain in "Creating" state until its artifact is uploaded. * `artifact_content_disposition` - (Optional) This allows to specify a filename during upload. This file name is used to dispose of the file contents while downloading the file. Example: `attachment; filename=model-artifact.zip` * `artifact_content_length` - (Optional, Required if `model_artifact` is set) The content length of the model_artifact. @@ -95,6 +121,14 @@ Any change to a property that does not support update will force the destruction The following attributes are exported: +* `backup_operation_details` - Backup operation details of the model. + * `backup_state` - The backup status of the model. + * `backup_state_details` - The backup execution status details of the model. + * `time_last_backup` - The last backup execution time of the model. +* `backup_setting` - Back up setting details of the model. + * `backup_region` - Oracle Cloud Infrastructure backup region for the model. + * `customer_notification_type` - Customer notification on backup success/failure events. + * `is_backup_enabled` - Boolean flag representing whether backup needs to be enabled/disabled for the model. * `compartment_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model's compartment. * `created_by` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the model. * `custom_metadata_list` - An array of custom metadata details for the model. @@ -129,8 +163,22 @@ The following attributes are exported: * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. * `input_schema` - Input schema file content in String format +* `lifecycle_details` - Details about the lifecycle state of the model. +* `model_version_set_id` - The OCID of the model version set that the model is associated to. +* `model_version_set_name` - The name of the model version set that the model is associated to. * `output_schema` - Output schema file content in String format * `project_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project associated with the model. +* `retention_operation_details` - Retention operation details for the model. + * `archive_state` - The archival status of model. + * `archive_state_details` - The archival state details of the model. + * `delete_state` - The deletion status of the archived model. + * `delete_state_details` - The deletion status details of the archived model. + * `time_archival_scheduled` - The estimated archival time of the model based on the provided retention setting. + * `time_deletion_scheduled` - The estimated deletion time of the model based on the provided retention setting. +* `retention_setting` - Retention setting details of the model. + * `archive_after_days` - Number of days after which the model will be archived. + * `customer_notification_type` - Customer notification options on success/failure of archival, deletion events. + * `delete_after_days` - Number of days after which the archived model will be deleted. * `state` - The state of the model. * `time_created` - The date and time the resource was created in the timestamp format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2019-08-25T21:10:29.41Z From 56efaf5c1e165385fbcfb2a86b149017943b9d1a Mon Sep 17 00:00:00 2001 From: Cosmin Tudor Date: Tue, 8 Oct 2024 16:27:58 +0300 Subject: [PATCH 04/13] Added - Support for Add DB 23ai support to Globally Distributed Autonomous Database --- .../datasources.tf | 0 .../description.md | 2 +- ..._distributed_database_private_endpoints.tf | 6 + ..._distributed_database_sharded_databases.tf | 0 .../outputs.tf | 5 +- .../provider.tf | 4 +- .../terraform.auto.tfvars.example | 0 .../terraform.tfvars.template | 0 .../variables.tf | 0 .../datasources.tf | 30 + .../description.md | 2 + ..._distributed_database_private_endpoints.tf | 18 + ..._distributed_database_sharded_databases.tf | 121 ++++ .../outputs.tf | 107 +++ .../provider.tf | 14 + .../terraform.auto.tfvars.example | 46 ++ .../terraform.tfvars.template | 78 ++ .../variables.tf | 272 +++++++ ...tributed_database_private_endpoint_test.go | 8 +- ...ted_database_sharded_database_23ai_test.go | 678 ++++++++++++++++++ ...tributed_database_sharded_database_test.go | 44 +- ...d_database_private_endpoint_data_source.go | 4 + ...uted_database_private_endpoint_resource.go | 73 +- ...d_database_sharded_database_data_source.go | 10 + ...uted_database_sharded_database_resource.go | 91 ++- ..._database_sharded_databases_data_source.go | 12 + ...ed_database_private_endpoint.html.markdown | 1 + ...d_database_private_endpoints.html.markdown | 1 + ...ed_database_sharded_database.html.markdown | 3 + ...d_database_sharded_databases.html.markdown | 3 + ...ed_database_private_endpoint.html.markdown | 2 + ...ed_database_sharded_database.html.markdown | 9 + 32 files changed, 1615 insertions(+), 29 deletions(-) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/datasources.tf (100%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/description.md (55%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/oci_globally_distributed_database_private_endpoints.tf (86%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/oci_globally_distributed_database_sharded_databases.tf (100%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/outputs.tf (97%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/provider.tf (72%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/terraform.auto.tfvars.example (100%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/terraform.tfvars.template (100%) rename examples/globally_distributed_database/{ => globally_distributed_database_19c}/variables.tf (100%) create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/datasources.tf create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/description.md create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_private_endpoints.tf create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_sharded_databases.tf create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/outputs.tf create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/provider.tf create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/terraform.auto.tfvars.example create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/terraform.tfvars.template create mode 100644 examples/globally_distributed_database/globally_distributed_database_23ai/variables.tf create mode 100644 internal/integrationtest/globally_distributed_database_sharded_database_23ai_test.go diff --git a/examples/globally_distributed_database/datasources.tf b/examples/globally_distributed_database/globally_distributed_database_19c/datasources.tf similarity index 100% rename from examples/globally_distributed_database/datasources.tf rename to examples/globally_distributed_database/globally_distributed_database_19c/datasources.tf diff --git a/examples/globally_distributed_database/description.md b/examples/globally_distributed_database/globally_distributed_database_19c/description.md similarity index 55% rename from examples/globally_distributed_database/description.md rename to examples/globally_distributed_database/globally_distributed_database_19c/description.md index 21c5b220f2b..1f5ba5d2233 100644 --- a/examples/globally_distributed_database/description.md +++ b/examples/globally_distributed_database/globally_distributed_database_19c/description.md @@ -1,2 +1,2 @@ # Overview -This is a Terraform configuration that creates the Globally Distributed Database service on Oracle Cloud Infrastructure. \ No newline at end of file +This is a Terraform configuration that creates the Globally Distributed Database 19c service on Oracle Cloud Infrastructure. \ No newline at end of file diff --git a/examples/globally_distributed_database/oci_globally_distributed_database_private_endpoints.tf b/examples/globally_distributed_database/globally_distributed_database_19c/oci_globally_distributed_database_private_endpoints.tf similarity index 86% rename from examples/globally_distributed_database/oci_globally_distributed_database_private_endpoints.tf rename to examples/globally_distributed_database/globally_distributed_database_19c/oci_globally_distributed_database_private_endpoints.tf index 7700391321e..dede75b9604 100644 --- a/examples/globally_distributed_database/oci_globally_distributed_database_private_endpoints.tf +++ b/examples/globally_distributed_database/globally_distributed_database_19c/oci_globally_distributed_database_private_endpoints.tf @@ -9,4 +9,10 @@ resource "oci_globally_distributed_database_private_endpoint" "this" { description = "Test OCI Globally Distributed Database Private Endpoint" #freeform_tags = var.oci_globally_distributed_database_freeform_tags nsg_ids = var.nsg_ocids + + lifecycle { + ignore_changes = [ + sharded_databases, + ] + } } \ No newline at end of file diff --git a/examples/globally_distributed_database/oci_globally_distributed_database_sharded_databases.tf b/examples/globally_distributed_database/globally_distributed_database_19c/oci_globally_distributed_database_sharded_databases.tf similarity index 100% rename from examples/globally_distributed_database/oci_globally_distributed_database_sharded_databases.tf rename to examples/globally_distributed_database/globally_distributed_database_19c/oci_globally_distributed_database_sharded_databases.tf diff --git a/examples/globally_distributed_database/outputs.tf b/examples/globally_distributed_database/globally_distributed_database_19c/outputs.tf similarity index 97% rename from examples/globally_distributed_database/outputs.tf rename to examples/globally_distributed_database/globally_distributed_database_19c/outputs.tf index 4207ac9e9b7..b741c2a9d5b 100644 --- a/examples/globally_distributed_database/outputs.tf +++ b/examples/globally_distributed_database/globally_distributed_database_19c/outputs.tf @@ -11,7 +11,7 @@ output "oci_globally_distributed_database_sharded_database_non_secret" { oci_globally_distributed_database_sharded_database = { catalog_details = [ for catalog_detail in oci_globally_distributed_database_sharded_database.this.catalog_details : { - admin_password = nonsensitive(catalog_detail.admin_password) + //admin_password = nonsensitive(catalog_detail.admin_password) cloud_autonomous_vm_cluster_id = catalog_detail.cloud_autonomous_vm_cluster_id compute_count = catalog_detail.compute_count container_database_id = catalog_detail.container_database_id @@ -58,7 +58,7 @@ output "oci_globally_distributed_database_sharded_database_non_secret" { private_endpoint = oci_globally_distributed_database_sharded_database.this.private_endpoint shard_details = [ for shard_detail in oci_globally_distributed_database_sharded_database.this.shard_details : { - admin_password = nonsensitive(shard_detail.admin_password) + //admin_password = nonsensitive(shard_detail.admin_password) cloud_autonomous_vm_cluster_id = shard_detail.cloud_autonomous_vm_cluster_id compute_count = shard_detail.compute_count container_database_id = shard_detail.container_database_id @@ -94,6 +94,7 @@ output "oci_globally_distributed_database_sharded_database_non_secret" { data_source_sharded_database = data.oci_globally_distributed_database_sharded_database.this data_source_sharded_databases = data.oci_globally_distributed_database_sharded_databases.this } + sensitive = true } output "oci_globally_distributed_database_sharded_database" { diff --git a/examples/globally_distributed_database/provider.tf b/examples/globally_distributed_database/globally_distributed_database_19c/provider.tf similarity index 72% rename from examples/globally_distributed_database/provider.tf rename to examples/globally_distributed_database/globally_distributed_database_19c/provider.tf index e20c788228d..4be00679e8d 100644 --- a/examples/globally_distributed_database/provider.tf +++ b/examples/globally_distributed_database/globally_distributed_database_19c/provider.tf @@ -10,7 +10,5 @@ provider "oci" { region = var.region } -provider "local" { - version = ">=1.3.0" # Need this version of the local provider to support base64 encoded inputs -} + diff --git a/examples/globally_distributed_database/terraform.auto.tfvars.example b/examples/globally_distributed_database/globally_distributed_database_19c/terraform.auto.tfvars.example similarity index 100% rename from examples/globally_distributed_database/terraform.auto.tfvars.example rename to examples/globally_distributed_database/globally_distributed_database_19c/terraform.auto.tfvars.example diff --git a/examples/globally_distributed_database/terraform.tfvars.template b/examples/globally_distributed_database/globally_distributed_database_19c/terraform.tfvars.template similarity index 100% rename from examples/globally_distributed_database/terraform.tfvars.template rename to examples/globally_distributed_database/globally_distributed_database_19c/terraform.tfvars.template diff --git a/examples/globally_distributed_database/variables.tf b/examples/globally_distributed_database/globally_distributed_database_19c/variables.tf similarity index 100% rename from examples/globally_distributed_database/variables.tf rename to examples/globally_distributed_database/globally_distributed_database_19c/variables.tf diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/datasources.tf b/examples/globally_distributed_database/globally_distributed_database_23ai/datasources.tf new file mode 100644 index 00000000000..108697b8c20 --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/datasources.tf @@ -0,0 +1,30 @@ +data "oci_globally_distributed_database_private_endpoint" "this" { + #Required + private_endpoint_id = oci_globally_distributed_database_private_endpoint.this.id +} + +data "oci_globally_distributed_database_private_endpoints" "this" { + #Required + compartment_id = oci_globally_distributed_database_private_endpoint.this.compartment_id + + #Optional + display_name = oci_globally_distributed_database_private_endpoint.this.display_name + state = oci_globally_distributed_database_private_endpoint.this.state +} + +data "oci_globally_distributed_database_sharded_database" "this" { + #Required + sharded_database_id = oci_globally_distributed_database_sharded_database.this.id + + #Optional + metadata = "test" //oci_globally_distributed_database_sharded_database.this.metadata +} + +data "oci_globally_distributed_database_sharded_databases" "this" { + #Required + compartment_id = oci_globally_distributed_database_sharded_database.this.compartment_id + + #Optional + display_name = oci_globally_distributed_database_sharded_database.this.display_name + state = oci_globally_distributed_database_sharded_database.this.state +} \ No newline at end of file diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/description.md b/examples/globally_distributed_database/globally_distributed_database_23ai/description.md new file mode 100644 index 00000000000..83e1a0a3dda --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/description.md @@ -0,0 +1,2 @@ +# Overview +This is a Terraform configuration that creates the Globally Distributed Database 23ai service on Oracle Cloud Infrastructure. \ No newline at end of file diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_private_endpoints.tf b/examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_private_endpoints.tf new file mode 100644 index 00000000000..24081c09f38 --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_private_endpoints.tf @@ -0,0 +1,18 @@ +resource "oci_globally_distributed_database_private_endpoint" "this" { + #Required + compartment_id = var.compartment_ocid + display_name = "GloballyDistributedDB23ai-PrivateEndpoint-Example" + subnet_id = var.subnet_ocid + + #Optional + #defined_tags = var.oci_globally_distributed_database_defined_tags_value + description = "Test OCI Globally Distributed Database 23ai Private Endpoint" + #freeform_tags = var.oci_globally_distributed_database_freeform_tags + nsg_ids = var.nsg_ocids + + lifecycle { + ignore_changes = [ + sharded_databases, + ] + } +} \ No newline at end of file diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_sharded_databases.tf b/examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_sharded_databases.tf new file mode 100644 index 00000000000..3a19d7cac00 --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/oci_globally_distributed_database_sharded_databases.tf @@ -0,0 +1,121 @@ + +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +resource "oci_globally_distributed_database_sharded_database" "this" { + #Required + catalog_details { + #Required + admin_password = var.ogdd_sharded_database_catalog_details_admin_password + cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id + compute_count = var.ogdd_sharded_database_catalog_details_compute_count + data_storage_size_in_gbs = var.ogdd_sharded_database_catalog_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.ogdd_sharded_database_catalog_details_is_auto_scaling_enabled + peer_cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_catalog_details_peer_cloud_autonomous_vm_cluster_id + } + + character_set = var.ogdd_sharded_database_character_set + compartment_id = var.compartment_ocid + db_deployment_type = var.ogdd_sharded_database_db_deployment_type + db_version = var.ogdd_sharded_database_db_version + db_workload = var.ogdd_sharded_database_db_workload + display_name = "GloballyDistributedDB23ai-Sharded-Database-Example" + listener_port = var.ogdd_sharded_database_listener_port + listener_port_tls = var.listener_port_tls + ncharacter_set = var.ogdd_sharded_database_ncharacter_set + ons_port_local = var.ogdd_sharded_database_ons_port_local + ons_port_remote = var.ogdd_sharded_database_ons_port_remote + prefix = var.ogdd_sharded_database_prefix + replication_method = var.oci_globally_distributed_database_replication_method + replication_factor = var.oci_globally_distributed_database_replication_factor + replication_unit = var.oci_globally_distributed_database_replication_unit + + shard_details { + #Required + admin_password = var.ogdd_sharded_database_shard_details_admin_password + cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id + compute_count = var.ogdd_sharded_database_shard_details_compute_count + data_storage_size_in_gbs = var.ogdd_sharded_database_shard_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.ogdd_sharded_database_shard_details_is_auto_scaling_enabled + peer_cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_peer_cloud_autonomous_vm_cluster_id + shard_space = var.ogdd_sharded_database_shard_details_shard_space + encryption_key_details { + vault_id = var.vault_id + kms_key_id = var.kms_key_id + kms_key_version_id = var.kms_key_version_id + } + } + + shard_details { + #Required + admin_password = var.ogdd_sharded_database_shard_details_admin_password + //cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id + cloud_autonomous_vm_cluster_id = "ocid of the cluster id" + compute_count = var.ogdd_sharded_database_shard_details_compute_count + data_storage_size_in_gbs = var.ogdd_sharded_database_shard_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.ogdd_sharded_database_shard_details_is_auto_scaling_enabled + peer_cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_peer_cloud_autonomous_vm_cluster_id + shard_space = var.ogdd_sharded_database_shard_details_shard_space + encryption_key_details { + vault_id = var.vault_id + kms_key_id = var.kms_key_id + kms_key_version_id = var.kms_key_version_id + } + } + shard_details { + #Required + admin_password = var.ogdd_sharded_database_shard_details_admin_password + //cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id + cloud_autonomous_vm_cluster_id = "ocid of the cluster id" + compute_count = var.ogdd_sharded_database_shard_details_compute_count + data_storage_size_in_gbs = var.ogdd_sharded_database_shard_details_data_storage_size_in_gbs + is_auto_scaling_enabled = var.ogdd_sharded_database_shard_details_is_auto_scaling_enabled + peer_cloud_autonomous_vm_cluster_id = var.ogdd_sharded_database_shard_details_peer_cloud_autonomous_vm_cluster_id + shard_space = var.ogdd_sharded_database_shard_details_shard_space + encryption_key_details { + vault_id = var.vault_id + kms_key_id = var.kms_key_id + kms_key_version_id = var.kms_key_version_id + } + } + + sharding_method = var.ogdd_sharded_database_sharding_method + chunks = var.ogdd_sharded_database_chunks + cluster_certificate_common_name = var.ogdd_sharded_database_cluster_certificate_common_name + #defined_tags = var.oci_globally_distributed_database_defined_tags_value + #freeform_tags = var.oci_globally_distributed_database_freeform_tags + + # POST OPERATIONS + # POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value. + + configure_sharding_trigger = var.oci_globally_distributed_database_configure_sharding_trigger + download_gsm_certificate_signing_request_trigger = var.oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger + generate_gsm_certificate_signing_request_trigger = var.oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger + get_connection_string_trigger = var.oci_globally_distributed_database_get_connection_string_trigger + start_database_trigger = var.oci_globally_distributed_database_start_database_trigger + stop_database_trigger = var.oci_globally_distributed_database_stop_database_trigger + validate_network_trigger = var.oci_globally_distributed_database_validate_network_trigger + upload_signed_certificate_and_generate_wallet_trigger = var.oci_globally_distributed_database_upload_signed_certificate_and_generate_wallet + ca_signed_certificate = null//file(var.oci_globally_distributed_database_ca_signed_certificate) + configure_gsms_trigger = var.oci_globally_distributed_database_configure_gsms_trigger + configure_gsms_trigger_old_gsm_names = var.oci_globally_distributed_database_configure_gsms_trigger_old_gsm_names + configure_gsms_trigger_is_latest_gsm_image = var.oci_globally_distributed_database_configure_gsms_trigger_is_latest_gsm_image + generate_wallet_trigger = var.oci_globally_distributed_database_generate_wallet + generate_wallet_password = var.oci_globally_distributed_database_generate_wallet_password + + # PATCH Operations + /* + patch_operations { + #Required + operation = var.oci_globally_distributed_database_patch_operation_operation + selection = var.oci_globally_distributed_database_patch_operation_selection + + #Optional + value = var.oci_globally_distributed_database_patch_operation_value + } + */ + + depends_on = [oci_globally_distributed_database_private_endpoint.this] +} + diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/outputs.tf b/examples/globally_distributed_database/globally_distributed_database_23ai/outputs.tf new file mode 100644 index 00000000000..b741c2a9d5b --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/outputs.tf @@ -0,0 +1,107 @@ +output "oci_globally_distributed_database_private_endpoints" { + value = { + oci_globally_distributed_database_private_endpoint = oci_globally_distributed_database_private_endpoint.this + data_source_private_endpoint = data.oci_globally_distributed_database_private_endpoint.this + data_source_private_endpoints = data.oci_globally_distributed_database_private_endpoints.this + } +} + +output "oci_globally_distributed_database_sharded_database_non_secret" { + value = { + oci_globally_distributed_database_sharded_database = { + catalog_details = [ + for catalog_detail in oci_globally_distributed_database_sharded_database.this.catalog_details : { + //admin_password = nonsensitive(catalog_detail.admin_password) + cloud_autonomous_vm_cluster_id = catalog_detail.cloud_autonomous_vm_cluster_id + compute_count = catalog_detail.compute_count + container_database_id = catalog_detail.container_database_id + container_database_parent_id = catalog_detail.container_database_parent_id + data_storage_size_in_gbs = catalog_detail.container_database_parent_id + encryption_key_details = catalog_detail.encryption_key_details + is_auto_scaling_enabled = catalog_detail.is_auto_scaling_enabled + metadata = catalog_detail.metadata + name = catalog_detail.name + peer_cloud_autonomous_vm_cluster_id = catalog_detail.peer_cloud_autonomous_vm_cluster_id + shard_group = catalog_detail.shard_group + status = catalog_detail.status + supporting_resource_id = catalog_detail.supporting_resource_id + time_created = catalog_detail.time_created + time_ssl_certificate_expires = catalog_detail.time_ssl_certificate_expires + time_updated = catalog_detail.time_updated + } + ] + character_set = oci_globally_distributed_database_sharded_database.this.character_set + chunks = oci_globally_distributed_database_sharded_database.this.chunks + cluster_certificate_common_name = oci_globally_distributed_database_sharded_database.this.cluster_certificate_common_name + compartment_id = oci_globally_distributed_database_sharded_database.this.compartment_id + configure_sharding_trigger = oci_globally_distributed_database_sharded_database.this.configure_sharding_trigger + connection_strings = oci_globally_distributed_database_sharded_database.this.connection_strings + db_deployment_type = oci_globally_distributed_database_sharded_database.this.db_deployment_type + db_version = oci_globally_distributed_database_sharded_database.this.db_version + db_workload = oci_globally_distributed_database_sharded_database.this.db_workload + defined_tags = oci_globally_distributed_database_sharded_database.this.defined_tags + display_name = oci_globally_distributed_database_sharded_database.this.display_name + download_gsm_certificate_signing_request_trigger = oci_globally_distributed_database_sharded_database.this.download_gsm_certificate_signing_request_trigger + freeform_tags = oci_globally_distributed_database_sharded_database.this.freeform_tags + generate_gsm_certificate_signing_request_trigger = oci_globally_distributed_database_sharded_database.this.generate_gsm_certificate_signing_request_trigger + //fetched_all_connection_strings = oci_globally_distributed_database_sharded_database.this.fetched_all_connection_strings + gsms = oci_globally_distributed_database_sharded_database.this.gsms + id = oci_globally_distributed_database_sharded_database.this.id + lifecycle_state_details = oci_globally_distributed_database_sharded_database.this.lifecycle_state_details + listener_port = oci_globally_distributed_database_sharded_database.this.listener_port + listener_port_tls = oci_globally_distributed_database_sharded_database.this.listener_port_tls + ncharacter_set = oci_globally_distributed_database_sharded_database.this.ncharacter_set + ons_port_local = oci_globally_distributed_database_sharded_database.this.ons_port_local + ons_port_remote = oci_globally_distributed_database_sharded_database.this.ons_port_remote + patch_operations = oci_globally_distributed_database_sharded_database.this.patch_operations + prefix = oci_globally_distributed_database_sharded_database.this.prefix + private_endpoint = oci_globally_distributed_database_sharded_database.this.private_endpoint + shard_details = [ + for shard_detail in oci_globally_distributed_database_sharded_database.this.shard_details : { + //admin_password = nonsensitive(shard_detail.admin_password) + cloud_autonomous_vm_cluster_id = shard_detail.cloud_autonomous_vm_cluster_id + compute_count = shard_detail.compute_count + container_database_id = shard_detail.container_database_id + container_database_parent_id = shard_detail.container_database_parent_id + data_storage_size_in_gbs = shard_detail.data_storage_size_in_gbs + encryption_key_details = shard_detail.encryption_key_details + is_auto_scaling_enabled = shard_detail.is_auto_scaling_enabled + metadata = shard_detail.metadata + name = shard_detail.name + peer_cloud_autonomous_vm_cluster_id = shard_detail.peer_cloud_autonomous_vm_cluster_id + shard_group = shard_detail.shard_group + shard_space = shard_detail.shard_space + status = shard_detail.status + supporting_resource_id = shard_detail.supporting_resource_id + time_created = shard_detail.time_created + time_ssl_certificate_expires = shard_detail.time_ssl_certificate_expires + time_updated = shard_detail.time_updated + } + ] + sharded_database_id = oci_globally_distributed_database_sharded_database.this.sharded_database_id + sharding_method = oci_globally_distributed_database_sharded_database.this.sharding_method + start_database_trigger = oci_globally_distributed_database_sharded_database.this.start_database_trigger + state = oci_globally_distributed_database_sharded_database.this.state + stop_database_trigger = oci_globally_distributed_database_sharded_database.this.stop_database_trigger + system_tags = oci_globally_distributed_database_sharded_database.this.system_tags + time_created = oci_globally_distributed_database_sharded_database.this.time_created + time_updated = oci_globally_distributed_database_sharded_database.this.time_updated + time_zone = oci_globally_distributed_database_sharded_database.this.time_zone + timeouts = oci_globally_distributed_database_sharded_database.this.timeouts + get_connection_string_trigger = oci_globally_distributed_database_sharded_database.this.get_connection_string_trigger + validate_network_trigger = oci_globally_distributed_database_sharded_database.this.validate_network_trigger + }, + data_source_sharded_database = data.oci_globally_distributed_database_sharded_database.this + data_source_sharded_databases = data.oci_globally_distributed_database_sharded_databases.this + } + sensitive = true +} + +output "oci_globally_distributed_database_sharded_database" { + value = { + oci_globally_distributed_database_sharded_database = oci_globally_distributed_database_sharded_database.this, + data_source_sharded_database = data.oci_globally_distributed_database_sharded_database.this + data_source_sharded_databases = data.oci_globally_distributed_database_sharded_databases.this + } + sensitive = true +} \ No newline at end of file diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/provider.tf b/examples/globally_distributed_database/globally_distributed_database_23ai/provider.tf new file mode 100644 index 00000000000..4be00679e8d --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/provider.tf @@ -0,0 +1,14 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "config_file_profile" { +} + +provider "oci" { + auth = "SecurityToken" + config_file_profile = var.config_file_profile + region = var.region +} + + + diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/terraform.auto.tfvars.example b/examples/globally_distributed_database/globally_distributed_database_23ai/terraform.auto.tfvars.example new file mode 100644 index 00000000000..d92fb3cb2a7 --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/terraform.auto.tfvars.example @@ -0,0 +1,46 @@ +compartment_ocid = "" +subnet_ocid = "" +oci_globally_distributed_database_defined_tags_value = null +ogdd_sharded_database_catalog_details_admin_password = "Admin PWD" +ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_db_version = "19c" +ogdd_sharded_database_listener_port = 37382 +listener_port_tls = 37383 +ogdd_sharded_database_ons_port_local = 37385 +ogdd_sharded_database_ons_port_remote = 37386 +ogdd_sharded_database_prefix = "c19" +ogdd_sharded_database_shard_details_admin_password = "Admin PWD" +ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_shard_details_shard_space = "xyz" +ogdd_sharded_database_cluster_certificate_common_name = "gdad_preprod" + +# POST +oci_globally_distributed_database_configure_sharding_trigger = null +oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_get_connection_string_trigger = null +oci_globally_distributed_database_start_database_trigger = null +oci_globally_distributed_database_stop_database_trigger = null +oci_globally_distributed_database_validate_network_trigger = null + +#PATCH + +/* +oci_globally_distributed_database_patch_operation_operation = "MERGE" +oci_globally_distributed_database_patch_operation_selection = "shardDetails[?name=='c5600000td']" +oci_globally_distributed_database_patch_operation_value = "{\"computeCount\":4,\"dataStorageSizeInGbs\":16,\"isAutoScalingEnabled\":false}" +*/ + +/* +oci_globally_distributed_database_patch_operation_operation = "REMOVE" +oci_globally_distributed_database_patch_operation_selection = "shardDetails[?name=='c5600000td']" +oci_globally_distributed_database_patch_operation_value = "" +*/ + +/* +oci_globally_distributed_database_patch_operation_operation = "INSERT" +oci_globally_distributed_database_patch_operation_selection = "shardDetails" +oci_globally_distributed_database_patch_operation_value = "{ \"characterSet\": \"AL32UTF8\", \"ncharacterSet\": \"AL16UTF16\", \"computeCount\": 2, \"dataStorageSizeInGbs\": 32, \"shardSpace\": \"shardSpace1\", \"isAutoScalingEnabled\": \"false\", \"cloudAutonomousVmClusterId\": \"\" }" +*/ + + diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/terraform.tfvars.template b/examples/globally_distributed_database/globally_distributed_database_23ai/terraform.tfvars.template new file mode 100644 index 00000000000..6a4d6a05ef5 --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/terraform.tfvars.template @@ -0,0 +1,78 @@ +# GETTING STARTED +# +# 1. Download and install TerraForm (https://www.terraform.io/downloads.html) +# 2. Download and install the OCI TerraForm provider (https://github.com/oracle/terraform-provider-oci/) +# 3. Make sure that you have an OCI API key setup +# See https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm for directions on creating an API signing key +# See https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm on how to manage API keys in the OCI UI or API +# 4. Copy your tenancy OCID below (bottom part of OCI screen, after Tenancy OCID: heading) +# 5. Copy your OCI user account OCID (login to OCI > Identity > Users) +# 6. Copy the required API key fingerprint and private key path (below) +# 7. Fill-in the full path to the SSH public and private keys (this can be used when creating new instances) +# See https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Tasks/creatingkeys.htm for directions on how to create this key pair +# +# HELPFUL URLs +# * https://github.com/oracle/terraform-provider-oci/blob/master/docs/Table%20of%20Contents.md +# + +# RUNNING TerraForm +# +# Once you've gone through the steps mentioned above, you need to populate your environment variables, by sourcing this file... steps are below: +# 1. Modify this file (so it reflects your OCIDs, etc.) +# 2. $ terraform init +# You only have to do this once after installing or upgrading your TerraForm plugins +# 3. $ terraform plan +# This will show you what TerraForm might do if you applied it +# 4. $ terraform apply + +# Get this from the bottom of the OCI screen (after logging in, after Tenancy ID: heading) +tenancy_ocid=" Identity > Users (for your user account) +user_ocid="" + +# the fingerprint can be gathered from your user account (OCI > Identity > Users > click your username > API Keys fingerprint (select it, copy it and paste it below)) +fingerprint="" +# this is the full path on your local system to the private key used for the API key pair +private_key_path="" + +# region (us-phoenix-1, ca-toronto-1, etc) +region="" + + +# Globally Distributed Database Example Configuration + +compartment_ocid = "" +subnet_ocid = "" +oci_globally_distributed_database_defined_tags_value = null +ogdd_sharded_database_catalog_details_admin_password = "Admin PWD" +ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_db_version = "19c" +ogdd_sharded_database_listener_port = 37382 +listener_port_tls = 37383 +ogdd_sharded_database_ons_port_local = 37385 +ogdd_sharded_database_ons_port_remote = 37386 +ogdd_sharded_database_prefix = "c19" +ogdd_sharded_database_shard_details_admin_password = "Admin PWD" +ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id = "" +ogdd_sharded_database_shard_details_shard_space = "xyz" +ogdd_sharded_database_cluster_certificate_common_name = "gdad_preprod" + +# POST +oci_globally_distributed_database_configure_sharding_trigger = null +oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger = null +oci_globally_distributed_database_get_connection_string_trigger = null +oci_globally_distributed_database_start_database_trigger = null +oci_globally_distributed_database_stop_database_trigger = null +oci_globally_distributed_database_validate_network_trigger = null + +#PATCH + + +oci_globally_distributed_database_patch_operation_operation = "MERGE" +oci_globally_distributed_database_patch_operation_selection = "shardDetails[?name=='c3900001td']" +oci_globally_distributed_database_patch_operation_value = { + computeCount = 4 + dataStorageSizeInGbs = 32 + isAutoScalingEnabled = true +} diff --git a/examples/globally_distributed_database/globally_distributed_database_23ai/variables.tf b/examples/globally_distributed_database/globally_distributed_database_23ai/variables.tf new file mode 100644 index 00000000000..dd11167dd7e --- /dev/null +++ b/examples/globally_distributed_database/globally_distributed_database_23ai/variables.tf @@ -0,0 +1,272 @@ + +variable "tenancy_ocid" { +} + +variable "user_ocid" { +} + +variable "fingerprint" { +} + +variable "private_key_path" { +} + +variable "private_key_password" { + default = null +} + +variable "region" { +} + +variable "compartment_ocid" { +} + +variable "subnet_ocid" { +} + +variable "nsg_ocids" { + type = list(string) + default = null +} + +variable "ogdd_sharded_database_catalog_details_admin_password" { +} + +variable "ogdd_sharded_database_catalog_details_cloud_autonomous_vm_cluster_id" { +} + +variable "ogdd_sharded_database_catalog_details_compute_count" { + default = 2 +} + +variable "ogdd_sharded_database_catalog_details_data_storage_size_in_gbs" { + default = 32 +} + +variable "ogdd_sharded_database_catalog_details_is_auto_scaling_enabled" { + type = bool + default = false +} + +variable "ogdd_sharded_database_catalog_details_peer_cloud_autonomous_vm_cluster_id" { + default = null +} + +variable "ogdd_sharded_database_character_set" { + default = "AL32UTF8" +} + +variable "ogdd_sharded_database_db_deployment_type" { + default = "DEDICATED" +} + +variable "ogdd_sharded_database_db_version" { + default = "19c" +} + +variable "ogdd_sharded_database_db_workload" { + default = "OLTP" +} + +variable "ogdd_sharded_database_listener_port" { + type = number + default = 37381 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "listener_port_tls" { + type = number + default = 37382 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "ogdd_sharded_database_ncharacter_set" { + default = "AL16UTF16" +} + +variable "ogdd_sharded_database_ons_port_local" { + type = number + default = 37384 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "ogdd_sharded_database_ons_port_remote" { + type = number + default = 37385 + description = "Needs to be updated/incremented for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + +variable "ogdd_sharded_database_prefix" { + default = "p1" + description = "Needs to be updated to a unqiue value for each new service provisioning on the same environment, even if the previous services ware destroyed." +} + + +variable "ogdd_sharded_database_shard_details_admin_password" { +} + +variable "ogdd_sharded_database_shard_details_cloud_autonomous_vm_cluster_id" { +} + +variable "ogdd_sharded_database_shard_details_compute_count" { + default = 2 +} + +variable "ogdd_sharded_database_shard_details_data_storage_size_in_gbs" { + default = 32 +} + +variable "ogdd_sharded_database_shard_details_is_auto_scaling_enabled" { + type = bool + default = false +} + +variable "ogdd_sharded_database_shard_details_peer_cloud_autonomous_vm_cluster_id" { + default = null +} + +variable "ogdd_sharded_database_shard_details_shard_space" { + default = "my-shard-space" +} + +variable "ogdd_sharded_database_sharding_method" { + default = "SYSTEM" +} + +variable "ogdd_sharded_database_chunks" { + default = 120 +} + +variable "ogdd_sharded_database_cluster_certificate_common_name" { + default = "gdad_test" +} + +variable "autonomous_data_warehouse_db_workload" { + default = "DW" +} + +variable "oci_globally_distributed_database_defined_tags_value" { + default = { + "foo-namespace.bar-key" = "value" + } +} + +variable "oci_globally_distributed_database_freeform_tags" { + default = { + "Department" = "Finance" + } +} + +variable "oci_globally_distributed_database_replication_method" { + default = "RAFT" +} + +variable "oci_globally_distributed_database_replication_factor" { + default = 3 +} + +variable "oci_globally_distributed_database_replication_unit" { + default = 6 +} + +variable "vault_id" { + default = null +} + +variable "kms_key_id" { + default = null +} + +variable "kms_key_version_id" { + default = null +} + + +variable "oci_globally_distributed_database_configure_gsms_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_configure_gsms_trigger_old_gsm_names" { + type = list(string) + description = "configure gsms trigger old gsm names" + default = null +} + +variable "oci_globally_distributed_database_configure_gsms_trigger_is_latest_gsm_image" { + type = bool + description = "is latest gsm image" + default = null +} + +variable "oci_globally_distributed_database_configure_sharding_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_download_gsm_certificate_signing_request_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_generate_gsm_certificate_signing_request_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_upload_signed_certificate_and_generate_wallet" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_generate_wallet" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_generate_wallet_password" { + description = "Wallet password." + default = null +} + +variable "oci_globally_distributed_database_ca_signed_certificate" { + description = "ca signed certificate" + default = null +} + + +variable "oci_globally_distributed_database_get_connection_string_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_start_database_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_stop_database_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_validate_network_trigger" { + description = "POST operations will only be performed if the corresponding trigger is not NULL, is != 0 and is greater than the previous value." + default = null +} + +variable "oci_globally_distributed_database_patch_operation_operation" { + description = "(Required) (Updatable) The operation can be one of these values: INSERT, MERGE, REMOVE" + default = null +} + +variable "oci_globally_distributed_database_patch_operation_selection" { + description = "(Required) (Updatable)" + default = null +} + +variable "oci_globally_distributed_database_patch_operation_value" { + description = "(Required when operation=INSERT | MERGE) (Updatable)" + type = string + default = null +} \ No newline at end of file diff --git a/internal/integrationtest/globally_distributed_database_private_endpoint_test.go b/internal/integrationtest/globally_distributed_database_private_endpoint_test.go index b9f37e75a96..78272b1f09e 100644 --- a/internal/integrationtest/globally_distributed_database_private_endpoint_test.go +++ b/internal/integrationtest/globally_distributed_database_private_endpoint_test.go @@ -49,12 +49,11 @@ var ( "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "display_name": acctest.Representation{RepType: acctest.Required, Create: `pe0001`, Update: `displayName2`}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${var.subnet_id}`}, - //"vcn_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vcn_id}`}, - //"nsg1_ids": acctest.Representation{RepType: acctest.Required, Create: `${var.nsg1_ids}`}, - //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, "description": acctest.Representation{RepType: acctest.Optional, Create: `description`, Update: `description2`}, "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, - //"nsg_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`nsgIds`}, Update: []string{`nsgIds2`}}, + //"nsg_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`nsgIds`}, Update: []string{`nsgIds2`}}, + //"reinstate_proxy_instance_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, } GloballyDistributedDatabasePrivateEndpointResourceDependencies = "" /*acctest.GenerateResourceFromRepresentationMap("oci_core_network_security_group", "test_network_security_group", acctest.Required, acctest.Create, CoreNetworkSecurityGroupRepresentation) + @@ -233,6 +232,7 @@ func TestGloballyDistributedDatabasePrivateEndpointResource_basic(t *testing.T) resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "private_ip"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "proxy_compute_instance_id"), resource.TestCheckResourceAttr(singularDatasourceName, "sharded_databases.#", "0"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), diff --git a/internal/integrationtest/globally_distributed_database_sharded_database_23ai_test.go b/internal/integrationtest/globally_distributed_database_sharded_database_23ai_test.go new file mode 100644 index 00000000000..2e2301b57c0 --- /dev/null +++ b/internal/integrationtest/globally_distributed_database_sharded_database_23ai_test.go @@ -0,0 +1,678 @@ +// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2 + +package integrationtest + +import ( + "context" + "fmt" + "strconv" + "testing" + "time" + + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" + "github.com/oracle/oci-go-sdk/v65/common" + oci_globally_distributed_database "github.com/oracle/oci-go-sdk/v65/globallydistributeddatabase" + + "github.com/oracle/terraform-provider-oci/httpreplay" + "github.com/oracle/terraform-provider-oci/internal/acctest" + tf_client "github.com/oracle/terraform-provider-oci/internal/client" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" + "github.com/oracle/terraform-provider-oci/internal/tfresource" + "github.com/oracle/terraform-provider-oci/internal/utils" +) + +var ( + GloballyDistributedDatabaseShardedDatabase23aiRequiredOnlyResource = GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Required, acctest.Create, GloballyDistributedDatabaseShardedDatabase23aiRepresentation) + + GloballyDistributedDatabaseShardedDatabase23aiResourceConfig = GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabase23aiRepresentation) + + GloballyDistributedDatabaseShardedDatabase23aiSingularDataSourceRepresentation = map[string]interface{}{ + "sharded_database_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_globally_distributed_database_sharded_database.test_sharded_database.id}`}, + "metadata": acctest.Representation{RepType: acctest.Optional, Create: `{}`}, + } + + GloballyDistributedDatabaseShardedDatabase23aiDataSourceRepresentation = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `Sdb0001`, Update: `displayName2`}, + "state": acctest.Representation{RepType: acctest.Optional, Create: `INACTIVE`}, + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabase23aiDataSourceFilterRepresentation}} + GloballyDistributedDatabaseShardedDatabase23aiDataSourceFilterRepresentation = map[string]interface{}{ + "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, + "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_globally_distributed_database_sharded_database.test_sharded_database.id}`}}, + } + + GloballyDistributedDatabaseShardedDatabase23aiRepresentation = map[string]interface{}{ + "catalog_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabase23aiCatalogDetailsRepresentation}, + "character_set": acctest.Representation{RepType: acctest.Required, Create: `AL32UTF8`}, + "sharding_method": acctest.Representation{RepType: acctest.Required, Create: `USER`}, + "cluster_certificate_common_name": acctest.Representation{RepType: acctest.Required, Create: `gdad_cert`}, + "chunks": acctest.Representation{RepType: acctest.Optional, Create: `120`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "db_deployment_type": acctest.Representation{RepType: acctest.Required, Create: `DEDICATED`}, + "db_version": acctest.Representation{RepType: acctest.Required, Create: `23ai`}, + "db_workload": acctest.Representation{RepType: acctest.Required, Create: `OLTP`}, + "display_name": acctest.Representation{RepType: acctest.Required, Create: `Sdb0001`, Update: `displayName2`}, + "listener_port": acctest.Representation{RepType: acctest.Required, Create: `40001`}, + "listener_port_tls": acctest.Representation{RepType: acctest.Required, Create: `40002`}, + "ncharacter_set": acctest.Representation{RepType: acctest.Required, Create: `AL16UTF16`}, + "ons_port_local": acctest.Representation{RepType: acctest.Required, Create: `40003`}, + "ons_port_remote": acctest.Representation{RepType: acctest.Required, Create: `40004`}, + "prefix": acctest.Representation{RepType: acctest.Required, Create: `s01`}, + "shard_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabase23aiShardDetailsRepresentation}, + //"shard_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabase23aiShardDetailsRepresentationShard2}, + //"shard_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabase23aiShardDetailsRepresentationShard3}, + //"sharded_database_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_globally_distributed_database_sharded_database.test_sharded_database.id}`}, + //"sharding_method": acctest.Representation{RepType: acctest.Required, Create: `USER`}, + //"chunks": acctest.Representation{RepType: acctest.Optional, Create: `10`}, + //"cluster_certificate_common_name": acctest.Representation{RepType: acctest.Optional, Create: `production`}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + //"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + //"patch_operations": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabasePatchOperationsRepresentation}, + //"replication_factor": acctest.Representation{RepType: acctest.Optional, Create: `3`}, + //"replication_method": acctest.Representation{RepType: acctest.Optional, Create: `RAFT`}, + //"replication_unit": acctest.Representation{RepType: acctest.Optional, Create: `6`}, + //"configure_gsms_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"configure_sharding_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"download_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"generate_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"get_connection_string_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"start_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"stop_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"upload_signed_certificate_and_generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"validate_network_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + } + GloballyDistributedDatabaseShardedDatabase23aiCatalogDetailsRepresentation = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `WElcomeHome1234##`}, + "cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${var.catalog_cloud_autonomous_vm_cluster_id}`}, + "compute_count": acctest.Representation{RepType: acctest.Required, Create: `2`}, + "data_storage_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `32`}, + "is_auto_scaling_enabled": acctest.Representation{RepType: acctest.Required, Create: `false`}, + "encryption_key_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabase23aiCatalogDetailsEncryptionKeyDetailsRepresentation}, + //"peer_cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + } + GloballyDistributedDatabaseShardedDatabase23aiShardDetailsRepresentation = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `WElcomeHome1234##`}, + "cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + "compute_count": acctest.Representation{RepType: acctest.Required, Create: `2`}, + "data_storage_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `32`}, + "is_auto_scaling_enabled": acctest.Representation{RepType: acctest.Required, Create: `false`}, + "encryption_key_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabase23aiShardDetailsEncryptionKeyDetailsRepresentation}, + //"peer_cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + "shard_space": acctest.Representation{RepType: acctest.Required, Create: `xyz`}, + } + /*GloballyDistributedDatabaseShardedDatabase23aiShardDetailsRepresentationShard2 = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `WElcomeHome1234##`}, + "cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${var.cloud_autonomous_vm_cluster_id_2}`}, + "compute_count": acctest.Representation{RepType: acctest.Required, Create: `2`}, + "data_storage_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `32`}, + "is_auto_scaling_enabled": acctest.Representation{RepType: acctest.Required, Create: `false`}, + "encryption_key_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabase23aiShardDetailsEncryptionKeyDetailsRepresentation}, + //"peer_cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + "shard_space": acctest.Representation{RepType: acctest.Required, Create: `xyz`}, + } + GloballyDistributedDatabaseShardedDatabase23aiShardDetailsRepresentationShard3 = map[string]interface{}{ + "admin_password": acctest.Representation{RepType: acctest.Required, Create: `WElcomeHome1234##`}, + "cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Required, Create: `${var.cloud_autonomous_vm_cluster_id_3}`}, + "compute_count": acctest.Representation{RepType: acctest.Required, Create: `2`}, + "data_storage_size_in_gbs": acctest.Representation{RepType: acctest.Required, Create: `32`}, + "is_auto_scaling_enabled": acctest.Representation{RepType: acctest.Required, Create: `false`}, + "encryption_key_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabase23aiShardDetailsEncryptionKeyDetailsRepresentation}, + //"peer_cloud_autonomous_vm_cluster_id": acctest.Representation{RepType: acctest.Optional, Create: `${var.cloud_autonomous_vm_cluster_id}`}, + "shard_space": acctest.Representation{RepType: acctest.Required, Create: `xyz`}, + }*/ + /*GloballyDistributedDatabaseShardedDatabasePatchOperationsRepresentation = map[string]interface{}{ + "operation": acctest.Representation{RepType: acctest.Required, Create: `{}`}, + "selection": acctest.Representation{RepType: acctest.Required, Create: `{}`}, + "value": acctest.Representation{RepType: acctest.Optional, Create: `{}`}, + }*/ + GloballyDistributedDatabaseShardedDatabase23aiCatalogDetailsEncryptionKeyDetailsRepresentation = map[string]interface{}{ + "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${var.kms_key_id}`}, + "vault_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vault_id}`}, + //"kms_key_version_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_kms_key_version.test_key_version.id}`}, + } + GloballyDistributedDatabaseShardedDatabase23aiShardDetailsEncryptionKeyDetailsRepresentation = map[string]interface{}{ + "kms_key_id": acctest.Representation{RepType: acctest.Required, Create: `${var.kms_key_id}`}, + "vault_id": acctest.Representation{RepType: acctest.Required, Create: `${var.vault_id}`}, + //"kms_key_version_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_kms_key_version.test_key_version.id}`}, + } + + GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies = "" /*acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_cloud_autonomous_vm_cluster", "test_cloud_autonomous_vm_cluster", acctest.Required, acctest.Create, DatabaseCloudAutonomousVmClusterRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_database_cloud_exadata_infrastructure", "test_cloud_exadata_infrastructure", acctest.Required, acctest.Create, DatabaseCloudExadataInfrastructureRepresentation) + + acctest.GenerateResourceFromRepresentationMap("oci_dataflow_private_endpoint", "test_private_endpoint", acctest.Required, acctest.Create, DataflowPrivateEndpointRepresentation) + + AvailabilityDomainConfig +*/ + /*DefinedTagsDependencies*/ /*+ + acctest.GenerateResourceFromRepresentationMap("oci_kms_key_version", "test_key_version", acctest.Required, acctest.Create, KmsKeyVersionRepresentation) + + KeyResourceDependencyConfig + + acctest.GenerateResourceFromRepresentationMap("oci_kms_vault", "test_vault", acctest.Required, acctest.Create, KmsVaultRepresentation)*/ +) + +// issue-routing-tag: globally_distributed_database/default +func TestGloballyDistributedDatabase23aiShardedDatabaseResource_basic(t *testing.T) { + httpreplay.SetScenario("TestGloballyDistributedDatabase23aiShardedDatabaseResource_basic") + defer httpreplay.SaveScenario() + + config := acctest.ProviderTestConfig() + + compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid") + compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId) + + compartmentIdU := utils.GetEnvSettingWithDefault("compartment_id_for_update", compartmentId) + compartmentIdUVariableStr := fmt.Sprintf("variable \"compartment_id_for_update\" { default = \"%s\" }\n", compartmentIdU) + + /*vcnId := utils.GetEnvSettingWithBlankDefault("vcn_ocid") + vcnIdVariableStr := fmt.Sprintf("variable \"vcn_id\" { default = \"%s\" }\n", vcnId)*/ + + /*subnetId := utils.GetEnvSettingWithBlankDefault("subnet_ocid") + subnetIdVariableStr := fmt.Sprintf("variable \"subnet_id\" { default = \"%s\" }\n", subnetId)*/ + + cloudAutonomousVmClusterId := utils.GetEnvSettingWithBlankDefault("cloud_autonomous_vm_cluster_id") + cloudAutonomousVmClusterIdVariableStr := fmt.Sprintf("variable \"cloud_autonomous_vm_cluster_id\" { default = \"%s\" }\n", cloudAutonomousVmClusterId) + + catalogCloudAutonomousVmClusterId := utils.GetEnvSettingWithBlankDefault("catalog_cloud_autonomous_vm_cluster_id") + catalogCloudAutonomousVmClusterIdVariableStr := fmt.Sprintf("variable \"catalog_cloud_autonomous_vm_cluster_id\" { default = \"%s\" }\n", catalogCloudAutonomousVmClusterId) + + kmsKeyId := utils.GetEnvSettingWithBlankDefault("kms_key_id") + kmsKeyIdVariableStr := fmt.Sprintf("variable \"kms_key_id\" { default = \"%s\" }\n", kmsKeyId) + + vaultId := utils.GetEnvSettingWithBlankDefault("vault_id") + vaultIdVariableStr := fmt.Sprintf("variable \"vault_id\" { default = \"%s\" }\n", vaultId) + + resourceName := "oci_globally_distributed_database_sharded_database.test_sharded_database" + datasourceName := "data.oci_globally_distributed_database_sharded_databases.test_sharded_databases" + singularDatasourceName := "data.oci_globally_distributed_database_sharded_database.test_sharded_database" + + var resId, resId2 string + // Save TF content to Create resource with optional properties. This has to be exactly the same as the config part in the "create with optionals" step in the test. + acctest.SaveConfigContent(config+compartmentIdVariableStr+compartmentIdUVariableStr+cloudAutonomousVmClusterIdVariableStr+catalogCloudAutonomousVmClusterIdVariableStr+kmsKeyIdVariableStr+vaultIdVariableStr+GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies+ + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Create, GloballyDistributedDatabaseShardedDatabase23aiRepresentation), "globallydistributeddatabase", "shardedDatabase", t) + + acctest.ResourceTest(t, testAccCheckGloballyDistributedDatabase23aiShardedDatabaseDestroy, []resource.TestStep{ + // verify Create + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + catalogCloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Required, acctest.Create, GloballyDistributedDatabaseShardedDatabase23aiRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "23ai"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "Sdb0001"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + catalogCloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies, + }, + // verify Create with optionals + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + catalogCloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Create, GloballyDistributedDatabaseShardedDatabase23aiRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "chunks", "120"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "23ai"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "Sdb0001"), + //resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + //resource.TestCheckResourceAttr(resourceName, "replication_factor", "3"), + //resource.TestCheckResourceAttr(resourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(resourceName, "replication_unit", "6"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, + + // verify Update to the compartment (the compartment will be switched back in the next step) + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + catalogCloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Create, + acctest.RepresentationCopyWithNewProperties(GloballyDistributedDatabaseShardedDatabase23aiRepresentation, map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, + })), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "chunks", "120"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentIdU), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "23ai"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "Sdb0001"), + //resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + //resource.TestCheckResourceAttr(resourceName, "replication_factor", "3"), + //resource.TestCheckResourceAttr(resourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(resourceName, "replication_unit", "6"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("resource recreated when it was supposed to be updated") + } + return err + }, + ), + }, + + // verify updates to updatable parameters + { + Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + catalogCloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabase23aiRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(resourceName, "chunks", "120"), + resource.TestCheckResourceAttr(resourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(resourceName, "db_version", "23ai"), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + //resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(resourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(resourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + //resource.TestCheckResourceAttr(resourceName, "replication_factor", "3"), + //resource.TestCheckResourceAttr(resourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(resourceName, "replication_unit", "6"), + resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_id"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.kms_key_version_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.encryption_key_details.0.vault_id"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.name"), + //resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.peer_cloud_autonomous_vm_cluster_id"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(resourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_created"), + resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(resourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "time_created"), + resource.TestCheckResourceAttrSet(resourceName, "time_updated"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), + }, + // verify datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_globally_distributed_database_sharded_databases", "test_sharded_databases", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabase23aiDataSourceRepresentation) + + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + catalogCloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabase23aiResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Optional, acctest.Update, GloballyDistributedDatabaseShardedDatabase23aiRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "state", "INACTIVE"), + + //resource.TestCheckResourceAttr(datasourceName, "sharded_database_collection.#", "1"), + //resource.TestCheckResourceAttr(datasourceName, "sharded_database_collection.0.items.#", "1"), + ), + }, + // verify singular datasource + { + Config: config + + acctest.GenerateDataSourceFromRepresentationMap("oci_globally_distributed_database_sharded_database", "test_sharded_database", acctest.Required, acctest.Create, GloballyDistributedDatabaseShardedDatabase23aiSingularDataSourceRepresentation) + + compartmentIdVariableStr + compartmentIdUVariableStr + cloudAutonomousVmClusterIdVariableStr + catalogCloudAutonomousVmClusterIdVariableStr + kmsKeyIdVariableStr + vaultIdVariableStr + GloballyDistributedDatabaseShardedDatabase23aiResourceConfig, + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + //resource.TestCheckResourceAttr(singularDatasourceName, "metadata", "metadata"), + + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.compute_count", "2"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.container_database_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.container_database_parent_id"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "catalog_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.shard_group"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.status"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.supporting_resource_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.time_created"), + //resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.time_ssl_certificate_expires"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "catalog_details.0.time_updated"), + resource.TestCheckResourceAttr(singularDatasourceName, "character_set", "AL32UTF8"), + resource.TestCheckResourceAttr(singularDatasourceName, "chunks", "120"), + resource.TestCheckResourceAttr(singularDatasourceName, "cluster_certificate_common_name", "gdad_cert"), + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "connection_strings.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_deployment_type", "DEDICATED"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_version", "23ai"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + //resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "gsms.#", "3"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "listener_port", "40001"), + resource.TestCheckResourceAttr(singularDatasourceName, "listener_port_tls", "40002"), + resource.TestCheckResourceAttr(singularDatasourceName, "ncharacter_set", "AL16UTF16"), + resource.TestCheckResourceAttr(singularDatasourceName, "ons_port_local", "40003"), + resource.TestCheckResourceAttr(singularDatasourceName, "ons_port_remote", "40004"), + resource.TestCheckResourceAttr(singularDatasourceName, "prefix", "s01"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint"), + //resource.TestCheckResourceAttr(singularDatasourceName, "replication_factor", "3"), + //resource.TestCheckResourceAttr(singularDatasourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(singularDatasourceName, "replication_unit", "6"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.compute_count", "2"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.container_database_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.container_database_parent_id"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.data_storage_size_in_gbs", "32"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.encryption_key_details.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.name"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.shard_group"), + resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.shard_space", "xyz"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.status"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.supporting_resource_id"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.time_created"), + //resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.time_ssl_certificate_expires"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.time_updated"), + resource.TestCheckResourceAttr(singularDatasourceName, "sharding_method", "USER"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_zone"), + ), + }, + // verify resource import + { + Config: config + GloballyDistributedDatabaseShardedDatabase23aiRequiredOnlyResource, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "patch_operations", "catalog_details.0.admin_password", "shard_details.0.admin_password", + }, + ResourceName: resourceName, + }, + }) +} + +func testAccCheckGloballyDistributedDatabase23aiShardedDatabaseDestroy(s *terraform.State) error { + noResourceFound := true + client := acctest.TestAccProvider.Meta().(*tf_client.OracleClients).ShardedDatabaseServiceClient() + for _, rs := range s.RootModule().Resources { + if rs.Type == "oci_globally_distributed_database_sharded_database" { + noResourceFound = false + request := oci_globally_distributed_database.GetShardedDatabaseRequest{} + + if value, ok := rs.Primary.Attributes["metadata"]; ok { + request.Metadata = &value + } + + tmp := rs.Primary.ID + request.ShardedDatabaseId = &tmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "globally_distributed_database") + + response, err := client.GetShardedDatabase(context.Background(), request) + + if err == nil { + deletedLifecycleStates := map[string]bool{ + string(oci_globally_distributed_database.ShardedDatabaseLifecycleStateDeleted): true, + } + if _, ok := deletedLifecycleStates[string(response.GetLifecycleState())]; !ok { + //resource lifecycle state is not in expected deleted lifecycle states. + return fmt.Errorf("resource lifecycle state: %s is not in expected deleted lifecycle states", response.GetLifecycleState()) + } + //resource lifecycle state is in expected deleted lifecycle states. continue with next one. + continue + } + + //Verify that exception is for '404 not found'. + if failure, isServiceError := common.IsServiceError(err); !isServiceError || failure.GetHTTPStatusCode() != 404 { + return err + } + } + } + if noResourceFound { + return fmt.Errorf("at least one resource was expected from the state file, but could not be found") + } + + return nil +} + +func init() { + if acctest.DependencyGraph == nil { + acctest.InitDependencyGraph() + } + if !acctest.InSweeperExcludeList("GloballyDistributedDatabase23aiShardedDatabase") { + resource.AddTestSweepers("GloballyDistributedDatabase23aiShardedDatabase", &resource.Sweeper{ + Name: "GloballyDistributedDatabase23aiShardedDatabase", + Dependencies: acctest.DependencyGraph["shardedDatabase"], + F: sweepGloballyDistributedDatabase23aiShardedDatabaseResource, + }) + } +} + +func sweepGloballyDistributedDatabase23aiShardedDatabaseResource(compartment string) error { + shardedDatabaseServiceClient := acctest.GetTestClients(&schema.ResourceData{}).ShardedDatabaseServiceClient() + shardedDatabaseIds, err := getGloballyDistributedDatabase23aiShardedDatabaseIds(compartment) + if err != nil { + return err + } + for _, shardedDatabaseId := range shardedDatabaseIds { + if ok := acctest.SweeperDefaultResourceId[shardedDatabaseId]; !ok { + deleteShardedDatabaseRequest := oci_globally_distributed_database.DeleteShardedDatabaseRequest{} + + deleteShardedDatabaseRequest.ShardedDatabaseId = &shardedDatabaseId + + deleteShardedDatabaseRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(true, "globally_distributed_database") + _, error := shardedDatabaseServiceClient.DeleteShardedDatabase(context.Background(), deleteShardedDatabaseRequest) + if error != nil { + fmt.Printf("Error deleting ShardedDatabase %s %s, It is possible that the resource is already deleted. Please verify manually \n", shardedDatabaseId, error) + continue + } + acctest.WaitTillCondition(acctest.TestAccProvider, &shardedDatabaseId, GloballyDistributedDatabase23aiShardedDatabaseSweepWaitCondition, time.Duration(3*time.Minute), + GloballyDistributedDatabase23aiShardedDatabaseSweepResponseFetchOperation, "globally_distributed_database", true) + } + } + return nil +} + +func getGloballyDistributedDatabase23aiShardedDatabaseIds(compartment string) ([]string, error) { + ids := acctest.GetResourceIdsToSweep(compartment, "ShardedDatabaseId") + if ids != nil { + return ids, nil + } + var resourceIds []string + compartmentId := compartment + shardedDatabaseServiceClient := acctest.GetTestClients(&schema.ResourceData{}).ShardedDatabaseServiceClient() + + listShardedDatabasesRequest := oci_globally_distributed_database.ListShardedDatabasesRequest{} + listShardedDatabasesRequest.CompartmentId = &compartmentId + listShardedDatabasesRequest.LifecycleState = oci_globally_distributed_database.ShardedDatabaseLifecycleStateNeedsAttention + listShardedDatabasesResponse, err := shardedDatabaseServiceClient.ListShardedDatabases(context.Background(), listShardedDatabasesRequest) + + if err != nil { + return resourceIds, fmt.Errorf("Error getting ShardedDatabase list for compartment id : %s , %s \n", compartmentId, err) + } + for _, shardedDatabase := range listShardedDatabasesResponse.Items { + id := *shardedDatabase.GetId() + resourceIds = append(resourceIds, id) + acctest.AddResourceIdToSweeperResourceIdMap(compartmentId, "ShardedDatabaseId", id) + } + return resourceIds, nil +} + +func GloballyDistributedDatabase23aiShardedDatabaseSweepWaitCondition(response common.OCIOperationResponse) bool { + // Only stop if the resource is available beyond 3 mins. As there could be an issue for the sweeper to delete the resource and manual intervention required. + if shardedDatabaseResponse, ok := response.Response.(oci_globally_distributed_database.GetShardedDatabaseResponse); ok { + return shardedDatabaseResponse.GetLifecycleState() != oci_globally_distributed_database.ShardedDatabaseLifecycleStateDeleted + } + return false +} + +func GloballyDistributedDatabase23aiShardedDatabaseSweepResponseFetchOperation(client *tf_client.OracleClients, resourceId *string, retryPolicy *common.RetryPolicy) error { + _, err := client.ShardedDatabaseServiceClient().GetShardedDatabase(context.Background(), oci_globally_distributed_database.GetShardedDatabaseRequest{ + ShardedDatabaseId: resourceId, + RequestMetadata: common.RequestMetadata{ + RetryPolicy: retryPolicy, + }, + }) + return err +} diff --git a/internal/integrationtest/globally_distributed_database_sharded_database_test.go b/internal/integrationtest/globally_distributed_database_sharded_database_test.go index cc825f47a8c..94d21a99d27 100644 --- a/internal/integrationtest/globally_distributed_database_sharded_database_test.go +++ b/internal/integrationtest/globally_distributed_database_sharded_database_test.go @@ -65,19 +65,25 @@ var ( "prefix": acctest.Representation{RepType: acctest.Required, Create: `s01`}, "shard_details": acctest.RepresentationGroup{RepType: acctest.Required, Group: GloballyDistributedDatabaseShardedDatabaseShardDetailsRepresentation}, //"sharded_database_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_globally_distributed_database_sharded_database.test_sharded_database.id}`}, - //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, - //"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, - /*"patch_operations": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabasePatchOperationsRepresentation}, - "configure_gsms_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "configure_sharding_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "download_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "generate_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "get_connection_string_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "start_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "stop_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "upload_signed_certificate_and_generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, - "validate_network_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`},*/ + //"sharding_method": acctest.Representation{RepType: acctest.Required, Create: `USER`}, + //"chunks": acctest.Representation{RepType: acctest.Optional, Create: `10`}, + //"cluster_certificate_common_name": acctest.Representation{RepType: acctest.Optional, Create: `production`}, + //"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + //"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"bar-key": "value"}, Update: map[string]string{"Department": "Accounting"}}, + //"patch_operations": acctest.RepresentationGroup{RepType: acctest.Optional, Group: GloballyDistributedDatabaseShardedDatabasePatchOperationsRepresentation}, + //"replication_factor": acctest.Representation{RepType: acctest.Optional, Create: `10`}, + //"replication_method": acctest.Representation{RepType: acctest.Optional, Create: `RAFT`}, + //"replication_unit": acctest.Representation{RepType: acctest.Optional, Create: `10`}, + //"configure_gsms_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"configure_sharding_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"download_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"generate_gsm_certificate_signing_request_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"get_connection_string_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"start_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"stop_database_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"upload_signed_certificate_and_generate_wallet_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, + //"validate_network_trigger": acctest.Representation{RepType: acctest.Optional, Create: `0`, Update: `1`}, } GloballyDistributedDatabaseShardedDatabaseCatalogDetailsRepresentation = map[string]interface{}{ "admin_password": acctest.Representation{RepType: acctest.Required, Create: `WElcomeHome1234##`}, @@ -244,6 +250,9 @@ func TestGloballyDistributedDatabaseShardedDatabaseResource_basic(t *testing.T) resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + //resource.TestCheckResourceAttr(resourceName, "replication_factor", "10"), + //resource.TestCheckResourceAttr(resourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(resourceName, "replication_unit", "10"), resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), @@ -318,6 +327,9 @@ func TestGloballyDistributedDatabaseShardedDatabaseResource_basic(t *testing.T) resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + //resource.TestCheckResourceAttr(resourceName, "replication_factor", "10"), + //resource.TestCheckResourceAttr(resourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(resourceName, "replication_unit", "10"), resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), @@ -387,6 +399,9 @@ func TestGloballyDistributedDatabaseShardedDatabaseResource_basic(t *testing.T) resource.TestCheckResourceAttr(resourceName, "ons_port_local", "40003"), resource.TestCheckResourceAttr(resourceName, "ons_port_remote", "40004"), resource.TestCheckResourceAttr(resourceName, "prefix", "s01"), + //resource.TestCheckResourceAttr(resourceName, "replication_factor", "10"), + //resource.TestCheckResourceAttr(resourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(resourceName, "replication_unit", "10"), resource.TestCheckResourceAttr(resourceName, "shard_details.#", "1"), resource.TestCheckResourceAttr(resourceName, "shard_details.0.admin_password", "WElcomeHome1234##"), resource.TestCheckResourceAttrSet(resourceName, "shard_details.0.cloud_autonomous_vm_cluster_id"), @@ -474,6 +489,9 @@ func TestGloballyDistributedDatabaseShardedDatabaseResource_basic(t *testing.T) resource.TestCheckResourceAttr(singularDatasourceName, "ons_port_remote", "40004"), resource.TestCheckResourceAttr(singularDatasourceName, "prefix", "s01"), resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint"), + //resource.TestCheckResourceAttr(singularDatasourceName, "replication_factor", "10"), + //resource.TestCheckResourceAttr(singularDatasourceName, "replication_method", "RAFT"), + //resource.TestCheckResourceAttr(singularDatasourceName, "replication_unit", "10"), resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "shard_details.0.compute_count", "2"), resource.TestCheckResourceAttrSet(singularDatasourceName, "shard_details.0.container_database_id"), diff --git a/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_data_source.go b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_data_source.go index 144f71ed5de..b8dfe827d26 100644 --- a/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_data_source.go +++ b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_data_source.go @@ -94,6 +94,10 @@ func (s *GloballyDistributedDatabasePrivateEndpointDataSourceCrud) SetData() err s.D.Set("private_ip", *s.Res.PrivateIp) } + if s.Res.ProxyComputeInstanceId != nil { + s.D.Set("proxy_compute_instance_id", *s.Res.ProxyComputeInstanceId) + } + s.D.Set("sharded_databases", s.Res.ShardedDatabases) s.D.Set("state", s.Res.LifecycleState) diff --git a/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_resource.go b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_resource.go index fada9a84f55..e52d27b8fb8 100644 --- a/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_resource.go +++ b/internal/service/globally_distributed_database/globally_distributed_database_private_endpoint_resource.go @@ -77,6 +77,10 @@ func GloballyDistributedDatabasePrivateEndpointResource() *schema.Resource { Type: schema.TypeString, }, }, + "reinstate_proxy_instance_trigger": { + Type: schema.TypeInt, + Optional: true, + }, // Computed "lifecycle_state_details": { @@ -87,6 +91,10 @@ func GloballyDistributedDatabasePrivateEndpointResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "proxy_compute_instance_id": { + Type: schema.TypeString, + Computed: true, + }, "sharded_databases": { Type: schema.TypeList, Computed: true, @@ -124,7 +132,18 @@ func createGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m sync.D = d sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() - return tfresource.CreateResource(d, sync) + if e := tfresource.CreateResource(d, sync); e != nil { + return e + } + + if _, ok := sync.D.GetOkExists("reinstate_proxy_instance_trigger"); ok { + err := sync.ReinstateProxyInstance() + if err != nil { + return err + } + } + return nil + } func readGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m interface{}) error { @@ -140,7 +159,27 @@ func updateGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m sync.D = d sync.Client = m.(*client.OracleClients).ShardedDatabaseServiceClient() - return tfresource.UpdateResource(d, sync) + if _, ok := sync.D.GetOkExists("reinstate_proxy_instance_trigger"); ok && sync.D.HasChange("reinstate_proxy_instance_trigger") { + oldRaw, newRaw := sync.D.GetChange("reinstate_proxy_instance_trigger") + oldValue := oldRaw.(int) + newValue := newRaw.(int) + if oldValue < newValue { + err := sync.ReinstateProxyInstance() + + if err != nil { + return err + } + } else { + sync.D.Set("reinstate_proxy_instance_trigger", oldRaw) + return fmt.Errorf("new value of trigger should be greater than the old value") + } + } + + if err := tfresource.UpdateResource(d, sync); err != nil { + return err + } + + return nil } func deleteGloballyDistributedDatabasePrivateEndpoint(d *schema.ResourceData, m interface{}) error { @@ -498,6 +537,10 @@ func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) SetData() error s.D.Set("private_ip", *s.Res.PrivateIp) } + if s.Res.ProxyComputeInstanceId != nil { + s.D.Set("proxy_compute_instance_id", *s.Res.ProxyComputeInstanceId) + } + s.D.Set("sharded_databases", s.Res.ShardedDatabases) s.D.Set("state", s.Res.LifecycleState) @@ -525,6 +568,32 @@ func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) SetData() error return nil } +func (s *GloballyDistributedDatabasePrivateEndpointResourceCrud) ReinstateProxyInstance() error { + request := oci_globally_distributed_database.ReinstateProxyInstanceRequest{} + + idTmp := s.D.Id() + request.PrivateEndpointId = &idTmp + + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "globally_distributed_database") + + //response, err := s.Client.ReinstateProxyInstance(context.Background(), request) + /*if err != nil { + return err + }*/ + + if waitErr := tfresource.WaitForUpdatedState(s.D, s); waitErr != nil { + return waitErr + } + + val := s.D.Get("reinstate_proxy_instance_trigger") + s.D.Set("reinstate_proxy_instance_trigger", val) + + s.Res = nil + + //s.Res = &response.PrivateEndpoint + return nil +} + func PrivateEndpointSummaryToMap(obj oci_globally_distributed_database.PrivateEndpointSummary, datasource bool) map[string]interface{} { result := map[string]interface{}{} diff --git a/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_data_source.go b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_data_source.go index 1df2a61b100..69a678b82c9 100644 --- a/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_data_source.go +++ b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_data_source.go @@ -143,6 +143,16 @@ func (s *GloballyDistributedDatabaseShardedDatabaseDataSourceCrud) SetData() err s.D.Set("private_endpoint", *v.PrivateEndpoint) } + if v.ReplicationFactor != nil { + s.D.Set("replication_factor", *v.ReplicationFactor) + } + + s.D.Set("replication_method", v.ReplicationMethod) + + if v.ReplicationUnit != nil { + s.D.Set("replication_unit", *v.ReplicationUnit) + } + shardDetails := []interface{}{} for _, item := range v.ShardDetails { shardDetails = append(shardDetails, DedicatedShardDetailsToMap(item)) diff --git a/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_resource.go b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_resource.go index d455fa92fb2..61d8ce6da5f 100644 --- a/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_resource.go +++ b/internal/service/globally_distributed_database/globally_distributed_database_sharded_database_resource.go @@ -1,5 +1,5 @@ // Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. -// Licensed under the Mozilla Public License v2.0 frf +// Licensed under the Mozilla Public License v2.0 package globally_distributed_database @@ -412,9 +412,41 @@ func GloballyDistributedDatabaseShardedDatabaseResource() *schema.Resource { }, }, }, - "configure_gsms_trigger": { + "replication_factor": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ForceNew: true, + }, + "replication_method": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "replication_unit": { Type: schema.TypeInt, + Optional: true, Computed: true, + ForceNew: true, + }, + "configure_gsms_trigger": { + Type: schema.TypeInt, + Optional: true, + }, + "configure_gsms_trigger_old_gsm_names": { + Type: schema.TypeList, + Optional: true, + MaxItems: 50, + MinItems: 0, + //Set: tfresource.LiteralTypeHashCodeForSets, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "configure_gsms_trigger_is_latest_gsm_image": { + Type: schema.TypeBool, + Optional: true, }, "configure_sharding_trigger": { Type: schema.TypeInt, @@ -430,7 +462,12 @@ func GloballyDistributedDatabaseShardedDatabaseResource() *schema.Resource { }, "generate_wallet_trigger": { Type: schema.TypeInt, - Computed: true, + Optional: true, + }, + "generate_wallet_password": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, }, "get_connection_string_trigger": { Type: schema.TypeInt, @@ -451,7 +488,11 @@ func GloballyDistributedDatabaseShardedDatabaseResource() *schema.Resource { }, "upload_signed_certificate_and_generate_wallet_trigger": { Type: schema.TypeInt, - Computed: true, + Optional: true, + }, + "ca_signed_certificate": { + Type: schema.TypeString, + Optional: true, }, "validate_network_trigger": { Type: schema.TypeInt, @@ -1283,6 +1324,22 @@ func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) SetData() error s.D.Set("private_endpoint", *v.PrivateEndpoint) } + if v.ReplicationFactor != nil { + s.D.Set("replication_factor", *v.ReplicationFactor) + } + + s.D.Set("replication_method", v.ReplicationMethod) + + if v.ReplicationUnit != nil { + s.D.Set("replication_unit", *v.ReplicationUnit) + } + + //shardDetails := []interface{}{} + /*for _, item := range v.ShardDetails { + shardDetails = append(shardDetails, DedicatedShardDetailsToMap(item)) + } + s.D.Set("shard_details", shardDetails)*/ + s.D.Set("sharding_method", v.ShardingMethod) if v.TimeZone != nil { @@ -1442,6 +1499,11 @@ func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) DownloadGsmCert func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) GenerateGsmCertificateSigningRequest() error { request := oci_globally_distributed_database.GenerateGsmCertificateSigningRequestRequest{} + if caBundleId, ok := s.D.GetOkExists("ca_bundle_id"); ok { + tmp := caBundleId.(string) + request.CaBundleId = &tmp + } + idTmp := s.D.Id() request.ShardedDatabaseId = &idTmp @@ -2627,6 +2689,16 @@ func ShardedDatabaseSummaryToMap(obj oci_globally_distributed_database.ShardedDa result["prefix"] = string(*v.Prefix) } + if v.ReplicationFactor != nil { + result["replication_factor"] = int(*v.ReplicationFactor) + } + + result["replication_method"] = string(v.ReplicationMethod) + + if v.ReplicationUnit != nil { + result["replication_unit"] = int(*v.ReplicationUnit) + } + result["sharding_method"] = string(v.ShardingMethod) if v.TotalCpuCount != nil { @@ -2729,6 +2801,17 @@ func (s *GloballyDistributedDatabaseShardedDatabaseResourceCrud) populateTopLeve tmp := prefix.(string) details.Prefix = &tmp } + if replicationFactor, ok := s.D.GetOkExists("replication_factor"); ok { + tmp := replicationFactor.(int) + details.ReplicationFactor = &tmp + } + if replicationMethod, ok := s.D.GetOkExists("replication_method"); ok { + details.ReplicationMethod = oci_globally_distributed_database.DedicatedShardedDatabaseReplicationMethodEnum(replicationMethod.(string)) + } + if replicationUnit, ok := s.D.GetOkExists("replication_unit"); ok { + tmp := replicationUnit.(int) + details.ReplicationUnit = &tmp + } if shardDetails, ok := s.D.GetOkExists("shard_details"); ok { interfaces := shardDetails.([]interface{}) tmp := make([]oci_globally_distributed_database.CreateDedicatedShardDetail, len(interfaces)) diff --git a/internal/service/globally_distributed_database/globally_distributed_database_sharded_databases_data_source.go b/internal/service/globally_distributed_database/globally_distributed_database_sharded_databases_data_source.go index 8e36ce1bac6..e63008fef82 100644 --- a/internal/service/globally_distributed_database/globally_distributed_database_sharded_databases_data_source.go +++ b/internal/service/globally_distributed_database/globally_distributed_database_sharded_databases_data_source.go @@ -133,6 +133,18 @@ func GloballyDistributedDatabaseShardedDatabaseSummaryResource() *schema.Resourc Type: schema.TypeFloat, ForceNew: true, }, + "replication_factor": { + Type: schema.TypeInt, + ForceNew: true, + }, + "replication_method": { + Type: schema.TypeString, + ForceNew: true, + }, + "replication_unit": { + Type: schema.TypeInt, + ForceNew: true, + }, }, } } diff --git a/website/docs/d/globally_distributed_database_private_endpoint.html.markdown b/website/docs/d/globally_distributed_database_private_endpoint.html.markdown index ae6ac1ed1fc..70460ed90bb 100644 --- a/website/docs/d/globally_distributed_database_private_endpoint.html.markdown +++ b/website/docs/d/globally_distributed_database_private_endpoint.html.markdown @@ -42,6 +42,7 @@ The following attributes are exported: * `lifecycle_state_details` - Detailed message for the lifecycle state. * `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. * `private_ip` - IP address of the Private Endpoint. +* `proxy_compute_instance_id` - The identifier of the proxy compute instance. * `sharded_databases` - The OCIDs of sharded databases that consumes the given private endpoint. * `state` - Lifecycle states for private endpoint. * `subnet_id` - Identifier of the subnet in which private endpoint exists. diff --git a/website/docs/d/globally_distributed_database_private_endpoints.html.markdown b/website/docs/d/globally_distributed_database_private_endpoints.html.markdown index e11fda6a9b1..31b5c3263c9 100644 --- a/website/docs/d/globally_distributed_database_private_endpoints.html.markdown +++ b/website/docs/d/globally_distributed_database_private_endpoints.html.markdown @@ -54,6 +54,7 @@ The following attributes are exported: * `lifecycle_state_details` - Detailed message for the lifecycle state. * `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. * `private_ip` - IP address of the Private Endpoint. +* `proxy_compute_instance_id` - The identifier of the proxy compute instance. * `sharded_databases` - The OCIDs of sharded databases that consumes the given private endpoint. * `state` - Lifecycle states for private endpoint. * `subnet_id` - Identifier of the subnet in which private endpoint exists. diff --git a/website/docs/d/globally_distributed_database_sharded_database.html.markdown b/website/docs/d/globally_distributed_database_sharded_database.html.markdown index 62e425006b0..42e4a7830d5 100644 --- a/website/docs/d/globally_distributed_database_sharded_database.html.markdown +++ b/website/docs/d/globally_distributed_database_sharded_database.html.markdown @@ -88,6 +88,9 @@ The following attributes are exported: * `ons_port_remote` - Ons remote port number. * `prefix` - Unique prefix for the sharded database. * `private_endpoint` - The OCID of private endpoint being used by the sharded database. +* `replication_factor` - The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7. +* `replication_method` - The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG. +* `replication_unit` - For RAFT replication based sharded database, the value should be atleast twice the number of shards. * `shard_details` - Details of ATP-D based shards. * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the shard. * `compute_count` - The compute amount available to the underlying autonomous database associated with shard. diff --git a/website/docs/d/globally_distributed_database_sharded_databases.html.markdown b/website/docs/d/globally_distributed_database_sharded_databases.html.markdown index 0d551a01999..d6f812a1905 100644 --- a/website/docs/d/globally_distributed_database_sharded_databases.html.markdown +++ b/website/docs/d/globally_distributed_database_sharded_databases.html.markdown @@ -96,6 +96,9 @@ The following attributes are exported: * `ons_port_remote` - Ons remote port number. * `prefix` - Unique prefix for the sharded database. * `private_endpoint` - The OCID of private endpoint being used by the sharded database. +* `replication_factor` - The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7. +* `replication_method` - The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG. +* `replication_unit` - For RAFT replication based sharded database, the value should be atleast twice the number of shards. * `shard_details` - Details of ATP-D based shards. * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the shard. * `compute_count` - The compute amount available to the underlying autonomous database associated with shard. diff --git a/website/docs/r/globally_distributed_database_private_endpoint.html.markdown b/website/docs/r/globally_distributed_database_private_endpoint.html.markdown index 00a4ba417c2..ce596037e1a 100644 --- a/website/docs/r/globally_distributed_database_private_endpoint.html.markdown +++ b/website/docs/r/globally_distributed_database_private_endpoint.html.markdown @@ -41,6 +41,7 @@ The following arguments are supported: * `freeform_tags` - (Optional) (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` * `nsg_ids` - (Optional) (Updatable) The OCIDs of the network security groups that the private endpoint belongs to. * `subnet_id` - (Required) Identifier of the customer subnet against which private endpoint is to be created. +* `reinstate_proxy_instance_trigger` - (Optional) (Updatable) An optional property when incremented triggers Reinstate Proxy Instance. Could be set to any integer value. ** IMPORTANT ** @@ -59,6 +60,7 @@ The following attributes are exported: * `lifecycle_state_details` - Detailed message for the lifecycle state. * `nsg_ids` - The OCIDs of the network security groups that the private endpoint belongs to. * `private_ip` - IP address of the Private Endpoint. +* `proxy_compute_instance_id` - The identifier of the proxy compute instance. * `sharded_databases` - The OCIDs of sharded databases that consumes the given private endpoint. * `state` - Lifecycle states for private endpoint. * `subnet_id` - Identifier of the subnet in which private endpoint exists. diff --git a/website/docs/r/globally_distributed_database_sharded_database.html.markdown b/website/docs/r/globally_distributed_database_sharded_database.html.markdown index 664b2ecd29d..9d5651ed034 100644 --- a/website/docs/r/globally_distributed_database_sharded_database.html.markdown +++ b/website/docs/r/globally_distributed_database_sharded_database.html.markdown @@ -89,6 +89,9 @@ resource "oci_globally_distributed_database_sharded_database" "test_sharded_data #Optional value = var.sharded_database_patch_operations_value } + replication_factor = var.sharded_database_replication_factor + replication_method = var.sharded_database_replication_method + replication_unit = var.sharded_database_replication_unit } ``` @@ -127,6 +130,9 @@ The following arguments are supported: * `selection` - (Required) (Updatable) * `value` - (Required when operation=INSERT | MERGE) (Updatable) * `prefix` - (Required) Unique name prefix for the sharded databases. Only alpha-numeric values are allowed. First character has to be a letter followed by any combination of letter and number. +* `replication_factor` - (Optional) The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7. +* `replication_method` - (Optional) The Replication method for sharded database. +* `replication_unit` - (Optional) For RAFT replication based sharded database, the value should be atleast twice the number of shards. * `shard_details` - (Required) Collection of ATP-Dedicated shards that needs to be created. * `admin_password` - (Required) Admin password for shard database. * `cloud_autonomous_vm_cluster_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cloud Autonomous Exadata VM Cluster. @@ -211,6 +217,9 @@ The following attributes are exported: * `ons_port_remote` - Ons remote port number. * `prefix` - Unique prefix for the sharded database. * `private_endpoint` - The OCID of private endpoint being used by the sharded database. +* `replication_factor` - The Replication factor for RAFT replication based sharded database. Currently supported values are 3, 5 and 7. +* `replication_method` - The Replication method for sharded database. Use RAFT for Raft replication, and DG for DataGuard. If replicationMethod is not provided, it defaults to DG. +* `replication_unit` - For RAFT replication based sharded database, the value should be atleast twice the number of shards. * `shard_details` - Details of ATP-D based shards. * `cloud_autonomous_vm_cluster_id` - Identifier of the primary cloudAutonomousVmCluster for the shard. * `compute_count` - The compute amount available to the underlying autonomous database associated with shard. From 818fdf93ec10bfb467ff54bc7331f3c964b98c60 Mon Sep 17 00:00:00 2001 From: Kumar dhiraj Date: Mon, 14 Oct 2024 16:18:53 +0530 Subject: [PATCH 05/13] Added nlb-cp zpr support --- ...oad_balancer_network_load_balancer_test.go | 5 ++ ...ancer_network_load_balancer_data_source.go | 5 ++ ...balancer_network_load_balancer_resource.go | 80 +++++++++++++++++++ ...lancer_network_load_balancer.html.markdown | 1 + ...ancer_network_load_balancers.html.markdown | 3 +- ...lancer_network_load_balancer.html.markdown | 5 +- 6 files changed, 97 insertions(+), 2 deletions(-) diff --git a/internal/integrationtest/network_load_balancer_network_load_balancer_test.go b/internal/integrationtest/network_load_balancer_network_load_balancer_test.go index a273f6e0549..33bde93a7f5 100644 --- a/internal/integrationtest/network_load_balancer_network_load_balancer_test.go +++ b/internal/integrationtest/network_load_balancer_network_load_balancer_test.go @@ -63,6 +63,7 @@ var ( "reserved_ips": acctest.RepresentationGroup{RepType: acctest.Optional, Group: networkLoadBalancerReservedIpsRepresentation}, "network_security_group_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group.id}`}}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: NetworkLoadBalancerIgnoreChangesRepresentation}, + "security_attributes": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"secAttriZprNlbIAD.secAttriIAD.mode": "enforce", "secAttriZprNlbIAD.secAttriIAD.value": "someVal"}}, } NetworkLoadBalancerSubnetIpv6CidrRepresentation = map[string]interface{}{ @@ -231,6 +232,7 @@ func TestNetworkLoadBalancerNetworkLoadBalancerResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "ip_addresses.0.is_public", "true"), resource.TestCheckResourceAttrSet(resourceName, "ip_addresses.0.ip_address"), resource.TestCheckResourceAttrSet(resourceName, "ip_addresses.0.reserved_ip.0.id"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.%", "2"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -266,6 +268,7 @@ func TestNetworkLoadBalancerNetworkLoadBalancerResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "nlb_ip_version", "IPV4"), resource.TestCheckResourceAttrSet(resourceName, "ip_addresses.0.ip_address"), resource.TestCheckResourceAttrSet(resourceName, "ip_addresses.0.reserved_ip.0.id"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.%", "2"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -295,6 +298,7 @@ func TestNetworkLoadBalancerNetworkLoadBalancerResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "is_preserve_source_destination", "false"), resource.TestCheckResourceAttr(resourceName, "is_private", "false"), resource.TestCheckResourceAttr(resourceName, "nlb_ip_version", "IPV4"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.%", "2"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -374,6 +378,7 @@ func TestNetworkLoadBalancerNetworkLoadBalancerResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "is_private", "false"), resource.TestCheckResourceAttr(singularDatasourceName, "is_symmetric_hash_enabled", "false"), resource.TestCheckResourceAttr(singularDatasourceName, "nlb_ip_version", "IPV4"), + resource.TestCheckResourceAttr(singularDatasourceName, "security_attributes.%", "2"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_updated"), diff --git a/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_data_source.go b/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_data_source.go index 50445962bb8..680d51f8df5 100644 --- a/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_data_source.go +++ b/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_data_source.go @@ -104,6 +104,11 @@ func (s *NetworkLoadBalancerNetworkLoadBalancerDataSourceCrud) SetData() error { s.D.Set("network_security_group_ids", s.Res.NetworkSecurityGroupIds) s.D.Set("nlb_ip_version", s.Res.NlbIpVersion) + + if s.Res.SecurityAttributes != nil { + s.D.Set("security_attributes", SecurityAttributesToMap(s.Res.SecurityAttributes)) + } + s.D.Set("state", s.Res.LifecycleState) if s.Res.SubnetId != nil { diff --git a/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_resource.go b/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_resource.go index 2029633a694..b19bfce584b 100644 --- a/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_resource.go +++ b/internal/service/network_load_balancer/network_load_balancer_network_load_balancer_resource.go @@ -6,6 +6,7 @@ package network_load_balancer import ( "context" "fmt" + "reflect" "strings" "time" @@ -121,6 +122,12 @@ func NetworkLoadBalancerNetworkLoadBalancerResource() *schema.Resource { }, }, }, + "security_attributes": { + Type: schema.TypeMap, + Optional: true, + Computed: true, + Elem: schema.TypeString, + }, "subnet_ipv6cidr": { Type: schema.TypeString, Optional: true, @@ -348,6 +355,11 @@ func (s *NetworkLoadBalancerNetworkLoadBalancerResourceCrud) Create() error { } } + if securityAttributes, ok := s.D.GetOkExists("security_attributes"); ok { + convertedAttributes := MapToSecurityAttributes(securityAttributes.(map[string]interface{})) + request.SecurityAttributes = convertedAttributes + } + if subnetId, ok := s.D.GetOkExists("subnet_id"); ok { tmp := subnetId.(string) request.SubnetId = &tmp @@ -567,6 +579,15 @@ func (s *NetworkLoadBalancerNetworkLoadBalancerResourceCrud) Update() error { request.NlbIpVersion = oci_network_load_balancer.NlbIpVersionEnum(nlbIpVersion.(string)) } + //if securityAttributes, ok := s.D.GetOkExists("security_attributes"); ok { + //request.SecurityAttributes = securityAttributes.(map[string]map[string]interface{}) + //} + + if securityAttributes, ok := s.D.GetOkExists("security_attributes"); ok { + convertedAttributes := MapToSecurityAttributes(securityAttributes.(map[string]interface{})) + request.SecurityAttributes = convertedAttributes + } + if subnetIpv6Cidr, ok := s.D.GetOkExists("subnet_ipv6cidr"); ok && s.D.HasChange("subnet_ipv6cidr") { tmp := subnetIpv6Cidr.(string) @@ -647,6 +668,10 @@ func (s *NetworkLoadBalancerNetworkLoadBalancerResourceCrud) SetData() error { } s.D.Set("network_security_group_ids", schema.NewSet(tfresource.LiteralTypeHashCodeForSets, networkSecurityGroupIds)) s.D.Set("nlb_ip_version", s.Res.NlbIpVersion) + + //s.D.Set("security_attributes", s.Res.SecurityAttributes) + s.D.Set("security_attributes", SecurityAttributesToMap(s.Res.SecurityAttributes)) + s.D.Set("state", s.Res.LifecycleState) if s.Res.SubnetId != nil { @@ -739,6 +764,9 @@ func NetworkLoadBalancerSummaryToMap(obj oci_network_load_balancer.NetworkLoadBa result["network_security_group_ids"] = schema.NewSet(tfresource.LiteralTypeHashCodeForSets, networkSecurityGroupIds) } result["nlb_ip_version"] = string(obj.NlbIpVersion) + + result["security_attributes"] = obj.SecurityAttributes + result["state"] = string(obj.LifecycleState) if obj.SubnetId != nil { @@ -830,3 +858,55 @@ func (s *NetworkLoadBalancerNetworkLoadBalancerResourceCrud) updateCompartment(c workId := response.OpcWorkRequestId return s.getNetworkLoadBalancerFromWorkRequest(workId, tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "network_load_balancer"), oci_network_load_balancer.ActionTypeUpdated, s.D.Timeout(schema.TimeoutUpdate)) } + +func MapToSecurityAttributes(rawMap map[string]interface{}) map[string]map[string]interface{} { + result := make(map[string]map[string]interface{}) + for fullKey, value := range rawMap { + keys := strings.Split(fullKey, ".") + if len(keys) < 2 { + continue + } + outerKey := keys[0] + innerKey := strings.Join(keys[1:], ".") + if result[outerKey] == nil { + result[outerKey] = make(map[string]interface{}) + } + unflattenHelper(result[outerKey], innerKey, value) + } + + return result +} + +func unflattenHelper(currentMap map[string]interface{}, key string, value interface{}) { + keys := strings.Split(key, ".") + for i, k := range keys { + if i == len(keys)-1 { + currentMap[k] = value + } else { + if _, ok := currentMap[k]; !ok { + currentMap[k] = make(map[string]interface{}) + } + currentMap = currentMap[k].(map[string]interface{}) + } + } +} + +func SecurityAttributesToMap(rm map[string]map[string]interface{}) map[string]interface{} { + result := make(map[string]interface{}) + for outerKey, innerMap := range rm { + flattenHelper(result, outerKey, innerMap) + } + + return result +} + +func flattenHelper(flat map[string]interface{}, prefix string, nested map[string]interface{}) { + for key, value := range nested { + fullKey := prefix + "." + key + if reflect.TypeOf(value).Kind() == reflect.Map { + flattenHelper(flat, fullKey, value.(map[string]interface{})) + } else { + flat[fullKey] = value + } + } +} diff --git a/website/docs/d/network_load_balancer_network_load_balancer.html.markdown b/website/docs/d/network_load_balancer_network_load_balancer.html.markdown index c335df438bf..8fdc608e934 100644 --- a/website/docs/d/network_load_balancer_network_load_balancer.html.markdown +++ b/website/docs/d/network_load_balancer_network_load_balancer.html.markdown @@ -155,6 +155,7 @@ The following attributes are exported: Example: ["ocid1.nsg.oc1.phx.unique_ID"] * `nlb_ip_version` - IP version associated with the NLB. +* `security_attributes` - ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{ "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }` * `state` - The current state of the network load balancer. * `subnet_id` - The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)." * `system_tags` - Key-value pair representing system tags' keys and values scoped to a namespace. Example: `{"bar-key": "value"}` diff --git a/website/docs/d/network_load_balancer_network_load_balancers.html.markdown b/website/docs/d/network_load_balancer_network_load_balancers.html.markdown index 0d756637bd9..7e512fdf04d 100644 --- a/website/docs/d/network_load_balancer_network_load_balancers.html.markdown +++ b/website/docs/d/network_load_balancer_network_load_balancers.html.markdown @@ -133,7 +133,8 @@ The following attributes are exported: * Network security groups define network security rules to govern ingress and egress traffic for the network load balancer. * The network security rules of other resources can reference the network security groups associated with the network load balancer to ensure access. - Example: ["ocid1.nsg.oc1.phx.unique_ID"] + Example: ["ocid1.nsg.oc1.phx.unique_ID"] +* `security_attributes` - ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{ "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }` * `state` - The current state of the network load balancer. * `subnet_id` - The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)." * `nlb_ip_version` - IP version associated with the NLB. diff --git a/website/docs/r/network_load_balancer_network_load_balancer.html.markdown b/website/docs/r/network_load_balancer_network_load_balancer.html.markdown index 819a4183f3d..d382884c6f4 100644 --- a/website/docs/r/network_load_balancer_network_load_balancer.html.markdown +++ b/website/docs/r/network_load_balancer_network_load_balancer.html.markdown @@ -140,6 +140,7 @@ resource "oci_network_load_balancer_network_load_balancer" "test_network_load_ba #Optional id = var.network_load_balancer_reserved_ips_id } + security_attributes = var.network_load_balancer_security_attributes subnet_ipv6cidr = var.network_load_balancer_subnet_ipv6cidr } ``` @@ -230,7 +231,8 @@ The following arguments are supported: Reserved public IP addresses are not deleted when the network load balancer is deleted. The IP addresses become unattached from the network load balancer. - Example: "ocid1.publicip.oc1.phx.unique_ID" + Example: "ocid1.publicip.oc1.phx.unique_ID" +* `security_attributes` - (Optional) (Updatable) ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}` * `subnet_id` - (Required) The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * `subnet_ipv6cidr` - (Optional) IPv6 subnet prefix selection. If Ipv6 subnet prefix is passed, Nlb Ipv6 Address would be assign within the cidr block. NLB has to be dual or single stack ipv6 to support this. @@ -334,6 +336,7 @@ The following attributes are exported: Example: ["ocid1.nsg.oc1.phx.unique_ID"] * `nlb_ip_version` - IP version associated with the NLB. +* `security_attributes` - ZPR tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{ "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }` * `state` - The current state of the network load balancer. * `subnet_id` - The subnet in which the network load balancer is spawned [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)." * `system_tags` - Key-value pair representing system tags' keys and values scoped to a namespace. Example: `{"bar-key": "value"}` From 322c70eb56663c714b540772c817605ac1c68284 Mon Sep 17 00:00:00 2001 From: Gavin Foley Date: Tue, 24 Sep 2024 18:56:59 -0400 Subject: [PATCH 06/13] Added - Compute support for ZPR --- examples/compute/instance/instance.tf | 5 +++++ examples/compute/vnic/vnic.tf | 5 +++++ .../integrationtest/core_instance_test.go | 19 +++++++++++++++---- .../core_vnic_attachment_resource_test.go | 4 +++- .../service/core/core_instance_data_source.go | 4 +++- .../service/core/core_instance_resource.go | 14 +++++++++----- .../core/core_instances_data_source.go | 4 +++- .../core/core_vnic_attachment_resource.go | 10 ++++------ website/docs/d/core_instance.html.markdown | 2 +- website/docs/d/core_instances.html.markdown | 2 +- website/docs/r/core_instance.html.markdown | 2 +- 11 files changed, 50 insertions(+), 21 deletions(-) diff --git a/examples/compute/instance/instance.tf b/examples/compute/instance/instance.tf index 73bb25ea6de..f32cec00cf5 100644 --- a/examples/compute/instance/instance.tf +++ b/examples/compute/instance/instance.tf @@ -153,6 +153,11 @@ resource "oci_core_instance" "test_instance" { "freeformkey${count.index}" = "freeformvalue${count.index}" } + security_attributes = { + "oracle-zpr.sensitivity.value" = "low" + "oracle-zpr.sensitivity.mode" = "enforce" + } + preemptible_instance_config { preemption_action { type = "TERMINATE" diff --git a/examples/compute/vnic/vnic.tf b/examples/compute/vnic/vnic.tf index e0405ab8b7c..4e06da7b38e 100644 --- a/examples/compute/vnic/vnic.tf +++ b/examples/compute/vnic/vnic.tf @@ -94,6 +94,11 @@ resource "oci_core_instance" "test_instance" { create_vnic_details { subnet_id = oci_core_subnet.test_subnet.id hostname_label = "testinstance" + + security_attributes = { + "oracle-zpr.sensitivity.value" = "low" + "oracle-zpr.sensitivity.mode" = "enforce" + } } metadata = { diff --git a/internal/integrationtest/core_instance_test.go b/internal/integrationtest/core_instance_test.go index 41c8f171242..61bd7698373 100644 --- a/internal/integrationtest/core_instance_test.go +++ b/internal/integrationtest/core_instance_test.go @@ -93,6 +93,7 @@ var ( "is_pv_encryption_in_transit_enabled": acctest.Representation{RepType: acctest.Optional, Create: `false`}, "launch_options": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceLaunchOptionsRepresentation}, "metadata": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"user_data": "abcd"}, Update: map[string]string{"user_data": "abcd", "volatile_data": "stringE"}}, + "security_attributes": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"test-namespace-20240722.test-attribute-20240822.value": "blue", "test-namespace-20240722.test-attribute-20240822.mode": "enforce"}}, "shape_config": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceShapeConfigRepresentation}, "source_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceSourceDetailsRepresentation}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, @@ -128,6 +129,7 @@ var ( "launch_options": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceLaunchOptionsRepresentation}, "launch_volume_attachments": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceLaunchWithExistingVolumeAttachmentsIscsiRepresentation}, "metadata": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"user_data": "abcd"}, Update: map[string]string{"user_data": "abcd", "volatile_data": "stringE"}}, + "security_attributes": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"test-namespace-20240722.test-attribute-20240822.value": "blue", "test-namespace-20240722.test-attribute-20240822.mode": "enforce"}}, "shape_config": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceShapeConfigRepresentation}, "source_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceSourceDetailsRepresentation}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, @@ -163,6 +165,7 @@ var ( "launch_options": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceLaunchOptionsRepresentation}, "launch_volume_attachments": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceLaunchWithCreateVolumeAttachmentsIscsiRepresentation}, "metadata": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"user_data": "abcd"}, Update: map[string]string{"user_data": "abcd", "volatile_data": "stringE"}}, + "security_attributes": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"test-namespace-20240722.test-attribute-20240822.value": "blue", "test-namespace-20240722.test-attribute-20240822.mode": "enforce"}}, "shape_config": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceShapeConfigRepresentation}, "source_details": acctest.RepresentationGroup{RepType: acctest.Optional, Group: CoreInstanceSourceDetailsRepresentation}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, @@ -1006,7 +1009,9 @@ func TestCoreInstanceResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "launch_volume_attachments.0.volume_id"), resource.TestCheckResourceAttr(resourceName, "metadata.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "region"), - resource.TestCheckResourceAttr(resourceName, "security_attributes.%", "1"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.%", "2"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.value", "blue"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.mode", "enforce"), resource.TestCheckResourceAttr(resourceName, "shape", "VM.Standard2.1"), resource.TestCheckResourceAttr(resourceName, "shape_config.#", "1"), resource.TestCheckResourceAttr(resourceName, "shape_config.0.ocpus", "1"), @@ -1126,7 +1131,9 @@ func TestCoreInstanceResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "launch_volume_attachments.0.launch_create_volume_details.0.vpus_per_gb", "50"), resource.TestCheckResourceAttr(resourceName, "metadata.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "region"), - resource.TestCheckResourceAttr(resourceName, "security_attributes.%", "1"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.%", "2"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.value", "blue"), + resource.TestCheckResourceAttr(resourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.mode", "enforce"), resource.TestCheckResourceAttr(resourceName, "shape", "VM.Standard2.1"), resource.TestCheckResourceAttr(resourceName, "shape_config.#", "1"), resource.TestCheckResourceAttr(resourceName, "shape_config.0.ocpus", "1"), @@ -1565,7 +1572,9 @@ func TestCoreInstanceResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "instances.0.launch_options.0.remote_data_volume_type", "PARAVIRTUALIZED"), resource.TestCheckResourceAttr(datasourceName, "instances.0.metadata.%", "2"), resource.TestCheckResourceAttrSet(datasourceName, "instances.0.region"), - resource.TestCheckResourceAttr(datasourceName, "instances.0.security_attributes.%", "1"), + resource.TestCheckResourceAttr(datasourceName, "instances.0.security_attributes.%", "2"), + resource.TestCheckResourceAttr(resourceName, "instances.0.security_attributes.test-namespace-20240722.test-attribute-20240822.value", "blue"), + resource.TestCheckResourceAttr(resourceName, "instances.0.security_attributes.test-namespace-20240722.test-attribute-20240822.mode", "enforce"), resource.TestCheckResourceAttrSet(datasourceName, "instances.0.security_attributes_state"), resource.TestCheckResourceAttr(datasourceName, "instances.0.shape", "VM.Standard2.1"), resource.TestCheckResourceAttr(datasourceName, "instances.0.shape_config.#", "1"), @@ -1626,7 +1635,9 @@ func TestCoreInstanceResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "launch_options.0.remote_data_volume_type", "PARAVIRTUALIZED"), resource.TestCheckResourceAttr(singularDatasourceName, "metadata.%", "2"), resource.TestCheckResourceAttrSet(singularDatasourceName, "region"), - resource.TestCheckResourceAttr(singularDatasourceName, "security_attributes.%", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "security_attributes.%", "2"), + resource.TestCheckResourceAttr(singularDatasourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.value", "blue"), + resource.TestCheckResourceAttr(singularDatasourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.mode", "enforce"), resource.TestCheckResourceAttrSet(singularDatasourceName, "security_attributes_state"), resource.TestCheckResourceAttr(singularDatasourceName, "shape", "VM.Standard2.1"), resource.TestCheckResourceAttr(singularDatasourceName, "shape_config.#", "1"), diff --git a/internal/integrationtest/core_vnic_attachment_resource_test.go b/internal/integrationtest/core_vnic_attachment_resource_test.go index 3094b31d006..b8a49af9fa4 100644 --- a/internal/integrationtest/core_vnic_attachment_resource_test.go +++ b/internal/integrationtest/core_vnic_attachment_resource_test.go @@ -155,6 +155,8 @@ func (s *ResourceCoreVnicAttachmentTestSuite) TestAccResourceCoreVnicAttachment_ resource.TestCheckResourceAttr(s.ResourceName, "create_vnic_details.0.nsg_ids.#", "2"), resource.TestCheckResourceAttrSet(s.VnicResourceName, "private_ip_address"), resource.TestCheckResourceAttr(s.VnicResourceName, "security_attributes.%", "2"), + resource.TestCheckResourceAttr(s.VnicResourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.value", "blue"), + resource.TestCheckResourceAttr(s.VnicResourceName, "security_attributes.test-namespace-20240722.test-attribute-20240822.mode", "enforce"), // @SDK 1/2018: Since we don't assign a public IP to this vnic, we will get a response from server // without a public_ip_address. Old SDK would have set it to empty, but new SDK will set it to nil. // Commenting out until we have a better way of handling this. @@ -164,7 +166,7 @@ func (s *ResourceCoreVnicAttachmentTestSuite) TestAccResourceCoreVnicAttachment_ func(ts *terraform.State) (err error) { newId, err := acctest.FromInstanceState(ts, s.ResourceName, "id") if newId != vaId { - return fmt.Errorf("Expected same ocid, got different.") + return fmt.Errorf("Expected same ocid (%s), got different (%s).", vaId, newId) } return err }, diff --git a/internal/service/core/core_instance_data_source.go b/internal/service/core/core_instance_data_source.go index 2994d297414..34b24f24180 100644 --- a/internal/service/core/core_instance_data_source.go +++ b/internal/service/core/core_instance_data_source.go @@ -179,7 +179,9 @@ func (s *CoreInstanceDataSourceCrud) SetData() error { s.D.Set("region", *s.Res.Region) } - s.D.Set("security_attributes", s.Res.SecurityAttributes) + if s.Res.SecurityAttributes != nil { + s.D.Set("security_attributes", tfresource.SecurityAttributesToMap(s.Res.SecurityAttributes)) + } s.D.Set("security_attributes_state", s.Res.SecurityAttributesState) diff --git a/internal/service/core/core_instance_resource.go b/internal/service/core/core_instance_resource.go index 2a2433a1f0d..b2d9df417d0 100644 --- a/internal/service/core/core_instance_resource.go +++ b/internal/service/core/core_instance_resource.go @@ -1315,7 +1315,7 @@ func (s *CoreInstanceResourceCrud) Create() error { } if securityAttributes, ok := s.D.GetOkExists("security_attributes"); ok { - request.SecurityAttributes = securityAttributes.(map[string]map[string]interface{}) + request.SecurityAttributes = tfresource.MapToSecurityAttributes(securityAttributes.(map[string]interface{})) } if shape, ok := s.D.GetOkExists("shape"); ok { @@ -1514,7 +1514,7 @@ func (s *CoreInstanceResourceCrud) Update() error { } if securityAttributes, ok := s.D.GetOkExists("security_attributes"); ok { - request.SecurityAttributes = securityAttributes.(map[string]map[string]interface{}) + request.SecurityAttributes = tfresource.MapToSecurityAttributes(securityAttributes.(map[string]interface{})) } s.Res = &response.Instance @@ -1717,7 +1717,9 @@ func (s *CoreInstanceResourceCrud) SetData() error { s.D.Set("region", *s.Res.Region) } - s.D.Set("security_attributes", s.Res.SecurityAttributes) + if s.Res.SecurityAttributes != nil { + s.D.Set("security_attributes", tfresource.SecurityAttributesToMap(s.Res.SecurityAttributes)) + } s.D.Set("security_attributes_state", s.Res.SecurityAttributesState) @@ -1890,7 +1892,7 @@ func (s *CoreInstanceResourceCrud) mapToCreateVnicDetailsInstance(fieldKeyFormat } if securityAttributes, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "security_attributes")); ok { - result.SecurityAttributes = securityAttributes.(map[string]map[string]interface{}) + result.SecurityAttributes = tfresource.MapToSecurityAttributes(securityAttributes.(map[string]interface{})) } if skipSourceDestCheck, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "skip_source_dest_check")); ok { @@ -1968,7 +1970,9 @@ func CreateVnicDetailsToMap(obj *oci_core.Vnic, createVnicDetails map[string]int result["private_ip"] = string(*obj.PrivateIp) } - result["security_attributes"] = obj.SecurityAttributes + if obj.SecurityAttributes != nil { + result["security_attributes"] = tfresource.SecurityAttributesToMap(obj.SecurityAttributes) + } if obj.SkipSourceDestCheck != nil { result["skip_source_dest_check"] = bool(*obj.SkipSourceDestCheck) diff --git a/internal/service/core/core_instances_data_source.go b/internal/service/core/core_instances_data_source.go index 253adb989da..8280d6d47dd 100644 --- a/internal/service/core/core_instances_data_source.go +++ b/internal/service/core/core_instances_data_source.go @@ -242,7 +242,9 @@ func (s *CoreInstancesDataSourceCrud) SetData() error { instance["region"] = *r.Region } - instance["security_attributes"] = r.SecurityAttributes + if r.SecurityAttributes != nil { + instance["security_attributes"] = tfresource.SecurityAttributesToMap(r.SecurityAttributes) + } instance["security_attributes_state"] = r.SecurityAttributesState diff --git a/internal/service/core/core_vnic_attachment_resource.go b/internal/service/core/core_vnic_attachment_resource.go index 0746c33bcb5..79896fc765f 100644 --- a/internal/service/core/core_vnic_attachment_resource.go +++ b/internal/service/core/core_vnic_attachment_resource.go @@ -542,9 +542,8 @@ func (s *CoreVnicAttachmentResourceCrud) mapToCreateVnicDetails(fieldKeyFormat s result.PrivateIp = &tmp } - if securityAttributes, ok := s.D.GetOkExists("security_attributes"); ok { - convertedAttributes := tfresource.MapToSecurityAttributes(securityAttributes.(map[string]interface{})) - result.SecurityAttributes = convertedAttributes + if securityAttributes, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "security_attributes")); ok { + result.SecurityAttributes = tfresource.MapToSecurityAttributes(securityAttributes.(map[string]interface{})) } if skipSourceDestCheck, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "skip_source_dest_check")); ok { @@ -608,9 +607,8 @@ func (s *CoreVnicAttachmentResourceCrud) mapToUpdateVnicDetails(fieldKeyFormat s result.SkipSourceDestCheck = &tmp } - if securityAttributes, ok := s.D.GetOkExists("security_attributes"); ok { - convertedAttributes := tfresource.MapToSecurityAttributes(securityAttributes.(map[string]interface{})) - result.SecurityAttributes = convertedAttributes + if securityAttributes, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "security_attributes")); ok { + result.SecurityAttributes = tfresource.MapToSecurityAttributes(securityAttributes.(map[string]interface{})) } return result, nil diff --git a/website/docs/d/core_instance.html.markdown b/website/docs/d/core_instance.html.markdown index 51fdddd5a69..0cef76a00b4 100644 --- a/website/docs/d/core_instance.html.markdown +++ b/website/docs/d/core_instance.html.markdown @@ -179,7 +179,7 @@ The following attributes are exported: For the us-phoenix-1 and us-ashburn-1 regions, `phx` and `iad` are returned, respectively. For all other regions, the full region name is returned. Examples: `phx`, `eu-frankfurt-1` -* `security_attributes` - Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` +* `security_attributes` - Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` * `security_attributes_state` - The lifecycle state of the `securityAttributes` * `shape` - The shape of the instance. The shape determines the number of CPUs and the amount of memory allocated to the instance. You can enumerate all available shapes by calling [ListShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Shape/ListShapes). * `shape_config` - The shape configuration for an instance. The shape configuration determines the resources allocated to an instance. diff --git a/website/docs/d/core_instances.html.markdown b/website/docs/d/core_instances.html.markdown index e8e0cb16e68..9f295310f97 100644 --- a/website/docs/d/core_instances.html.markdown +++ b/website/docs/d/core_instances.html.markdown @@ -194,7 +194,7 @@ The following attributes are exported: For the us-phoenix-1 and us-ashburn-1 regions, `phx` and `iad` are returned, respectively. For all other regions, the full region name is returned. Examples: `phx`, `eu-frankfurt-1` -* `security_attributes` - Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` +* `security_attributes` - Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` * `security_attributes_state` - The lifecycle state of the `securityAttributes` * `shape` - The shape of the instance. The shape determines the number of CPUs and the amount of memory allocated to the instance. You can enumerate all available shapes by calling [ListShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Shape/ListShapes). * `shape_config` - The shape configuration for an instance. The shape configuration determines the resources allocated to an instance. diff --git a/website/docs/r/core_instance.html.markdown b/website/docs/r/core_instance.html.markdown index ac7b42b0b74..75a4a4dcc53 100644 --- a/website/docs/r/core_instance.html.markdown +++ b/website/docs/r/core_instance.html.markdown @@ -464,7 +464,7 @@ The following arguments are supported: * `preemption_action` - (Required) The action to run when the preemptible instance is interrupted for eviction. * `preserve_boot_volume` - (Optional) Whether to preserve the boot volume that was used to launch the preemptible instance when the instance is terminated. Defaults to false if not specified. * `type` - (Required) The type of action to run when the instance is interrupted for eviction. -* `security_attributes` - (Optional) (Updatable) Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR": {"MaxEgressCount": {"value":"42","mode":"audit"}}}` +* `security_attributes` - (Optional) (Updatable) Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: `{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}` * `shape` - (Required) (Updatable) The shape of an instance. The shape determines the number of CPUs, amount of memory, and other resources allocated to the instance. You can enumerate all available shapes by calling [ListShapes](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Shape/ListShapes). From 46b76f7361266afaea98b007f85fc24f0ef26c73 Mon Sep 17 00:00:00 2001 From: Karthik Date: Fri, 13 Sep 2024 12:18:50 -0700 Subject: [PATCH 07/13] BugFix Scheduled Operations changed to only Optional field for terraform version > 1.*.* --- ...utonomous_database_scheduled_operations.tf | 58 ++++++ ...abase_autonomous_database_resource_test.go | 167 +++++++++--------- .../database_autonomous_database_test.go | 12 +- .../database_autonomous_database_resource.go | 2 - 4 files changed, 152 insertions(+), 87 deletions(-) create mode 100644 examples/database/adb/scheduled_operation/autonomous_database_scheduled_operations.tf diff --git a/examples/database/adb/scheduled_operation/autonomous_database_scheduled_operations.tf b/examples/database/adb/scheduled_operation/autonomous_database_scheduled_operations.tf new file mode 100644 index 00000000000..29f3d6df039 --- /dev/null +++ b/examples/database/adb/scheduled_operation/autonomous_database_scheduled_operations.tf @@ -0,0 +1,58 @@ +variable "tenancy_ocid" { +} + +variable "user_ocid" { +} + +variable "fingerprint" { +} + +variable "private_key_path" { +} + +variable "region" { +} + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +resource "oci_database_autonomous_database" "autonomous_database" { + #required + admin_password = "Ka2P7jb1_3?*##DZ" + compartment_id = "ocid1.tenancy.oc1..aaaaaaaayxnndmkzcpajuuptcojciksbdrlwofhbe3hve6lypcqfgx56ssva" + cpu_core_count = "6" + data_storage_size_in_tbs = "1" + db_name = "testdbScheduledOperations" + customer_contacts { + email = "test1@oracle.com" + } + customer_contacts { + email = "test2@oracle.com" + } + scheduled_operations { + day_of_week { + name = "MONDAY" + } + scheduled_start_time = "10:00" + scheduled_stop_time = "18:00" + } + scheduled_operations { + day_of_week { + name = "TUESDAY" + } + scheduled_start_time = "10:00" + scheduled_stop_time = "18:00" + } + scheduled_operations { + day_of_week { + name = "FRIDAY" + } + scheduled_start_time = "10:00" + scheduled_stop_time = "18:00" + } +} \ No newline at end of file diff --git a/internal/integrationtest/database_autonomous_database_resource_test.go b/internal/integrationtest/database_autonomous_database_resource_test.go index 629e1f06e06..97c59a153dc 100644 --- a/internal/integrationtest/database_autonomous_database_resource_test.go +++ b/internal/integrationtest/database_autonomous_database_resource_test.go @@ -1682,35 +1682,35 @@ func TestResourceDatabaseAutonomousDatabaseResource_privateEndpoint(t *testing.T compartmentIdVariableStr + AutonomousDatabasePrivateEndpointResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Update, acctest.GetUpdatedRepresentationCopy("nsg_ids", acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group2.id}`}}, autonomousDatabasePrivateEndpointRepresentation)), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(datasourceName, "db_workload", "OLTP"), - resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(datasourceName, "state", "AVAILABLE"), - - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.#", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.compartment_id", compartmentId), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.connection_strings.#", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.cpu_core_count", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.data_storage_size_in_tbs", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_name", adbName), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.db_version"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_workload", "OLTP"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.display_name", "displayName2"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.id"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_auto_scaling_enabled", "false"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_dedicated", "false"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.is_preview"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.nsg_ids.#", "1"), - //resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.private_endpoint"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_ip", "10.0.0.97"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_label", "xlx4fc9y"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.state"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.subnet_id"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.time_created"), - resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), - resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), - ), + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "state", "AVAILABLE"), + + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.connection_strings.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.cpu_core_count", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.data_storage_size_in_tbs", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_name", adbName), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.db_version"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_workload", "OLTP"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.id"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_dedicated", "false"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.is_preview"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.nsg_ids.#", "1"), + //resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.private_endpoint"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_ip", "10.0.0.97"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_label", "xlx4fc9y"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.state"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.subnet_id"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), + resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), + ), }, //4. verify singular datasource { @@ -1719,32 +1719,32 @@ func TestResourceDatabaseAutonomousDatabaseResource_privateEndpoint(t *testing.T compartmentIdVariableStr + AutonomousDatabasePrivateEndpointResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Update, acctest.GetUpdatedRepresentationCopy("nsg_ids", acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group2.id}`}}, autonomousDatabasePrivateEndpointRepresentation)), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttrSet(singularDatasourceName, "autonomous_database_id"), - - resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(singularDatasourceName, "connection_strings.#", "1"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "connection_strings.0.all_connection_strings.%"), - resource.TestCheckResourceAttr(singularDatasourceName, "cpu_core_count", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "data_storage_size_in_tbs", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "db_name", adbName), - resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), - resource.TestCheckResourceAttr(singularDatasourceName, "db_workload", "OLTP"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), - resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), - resource.TestCheckResourceAttr(singularDatasourceName, "is_auto_scaling_enabled", "false"), - resource.TestCheckResourceAttr(singularDatasourceName, "is_dedicated", "false"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "is_preview"), - resource.TestCheckResourceAttr(singularDatasourceName, "nsg_ids.#", "1"), - //resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint"), - resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_ip", "10.0.0.97"), - resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_label", "xlx4fc9y"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), - resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), - resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), - ), + resource.TestCheckResourceAttrSet(singularDatasourceName, "autonomous_database_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "connection_strings.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "connection_strings.0.all_connection_strings.%"), + resource.TestCheckResourceAttr(singularDatasourceName, "cpu_core_count", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "data_storage_size_in_tbs", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_name", adbName), + resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_dedicated", "false"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "is_preview"), + resource.TestCheckResourceAttr(singularDatasourceName, "nsg_ids.#", "1"), + //resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint"), + resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_ip", "10.0.0.97"), + resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_label", "xlx4fc9y"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), + resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), + ), }, //5. delete before next Create @@ -1793,34 +1793,34 @@ func TestResourceDatabaseAutonomousDatabaseResource_privateEndpoint(t *testing.T "private_endpoint_label": acctest.Representation{RepType: acctest.Optional, Create: `xlx4fc9y`}, "subnet_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_core_subnet.test_subnet.id}`}, }), []string{"whitelisted_ips"})), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#12"), - resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "1"), - resource.TestCheckResourceAttr(resourceName, "data_storage_size_in_tbs", "1"), - resource.TestCheckResourceAttr(resourceName, "db_name", adbName), - resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), - resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(resourceName, "id"), - resource.TestCheckResourceAttr(resourceName, "is_auto_scaling_enabled", "false"), - resource.TestCheckResourceAttr(resourceName, "is_dedicated", "false"), - resource.TestCheckResourceAttr(resourceName, "is_preview_version_with_service_terms_accepted", "false"), - resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), - resource.TestCheckResourceAttr(resourceName, "private_endpoint_label", "xlx4fc9y"), - resource.TestCheckResourceAttr(resourceName, "nsg_ids.#", "2"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), - resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), - resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), - - func(s *terraform.State) (err error) { - resId2, err = acctest.FromInstanceState(s, resourceName, "id") - if resId != resId2 { - return fmt.Errorf("Resource recreated when it was supposed to be updated.") - } - return err - }, - ), + resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#12"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "1"), + resource.TestCheckResourceAttr(resourceName, "data_storage_size_in_tbs", "1"), + resource.TestCheckResourceAttr(resourceName, "db_name", adbName), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "is_dedicated", "false"), + resource.TestCheckResourceAttr(resourceName, "is_preview_version_with_service_terms_accepted", "false"), + resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), + resource.TestCheckResourceAttr(resourceName, "private_endpoint_label", "xlx4fc9y"), + resource.TestCheckResourceAttr(resourceName, "nsg_ids.#", "2"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), + resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), }, //8. delete before next Create { @@ -4482,6 +4482,7 @@ func TestDatabaseAutonomousDatabaseResource_DeveloperDatabases(t *testing.T) { } func TestDatabaseAutonomousDatabaseResource_scheduledOperations(t *testing.T) { + httpreplay.SetScenario("TestDatabaseAutonomousDatabaseResource_scheduledOperations") defer httpreplay.SaveScenario() diff --git a/internal/integrationtest/database_autonomous_database_test.go b/internal/integrationtest/database_autonomous_database_test.go index 878f3718731..f95d7163dee 100644 --- a/internal/integrationtest/database_autonomous_database_test.go +++ b/internal/integrationtest/database_autonomous_database_test.go @@ -286,8 +286,16 @@ var ( "source_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_database_autonomous_database.test_autonomous_database_source.id}`}, }) - autonomousDatabaseRepresentationForScheduledOperations = acctest.RepresentationCopyWithNewProperties(DatabaseAutonomousDatabaseRepresentation, map[string]interface{}{}) - + autonomousDatabaseRepresentationForScheduledOperations = acctest.RepresentationCopyWithNewProperties(DatabaseAutonomousDatabaseRepresentation, map[string]interface{}{ + "scheduled_operations": []acctest.RepresentationGroup{ + {RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseScheduledOperationsRepresentationMonday}, + {RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseScheduledOperationsRepresentationTuesday}, + {RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseScheduledOperationsRepresentationWednesday}, + {RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseScheduledOperationsRepresentationThursday}, + {RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseScheduledOperationsRepresentationFriday}, + {RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseScheduledOperationsRepresentationSaturday}, + {RepType: acctest.Optional, Group: DatabaseAutonomousDatabaseScheduledOperationsRepresentationSunday}}, + }) DatabaseAutonomousDatabaseRepresentationDeveloper = map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "compute_count": acctest.Representation{RepType: acctest.Required, Create: `4`}, diff --git a/internal/service/database/database_autonomous_database_resource.go b/internal/service/database/database_autonomous_database_resource.go index a6beee87ec9..09320e8693b 100644 --- a/internal/service/database/database_autonomous_database_resource.go +++ b/internal/service/database/database_autonomous_database_resource.go @@ -442,12 +442,10 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { "scheduled_start_time": { Type: schema.TypeString, Optional: true, - Computed: true, }, "scheduled_stop_time": { Type: schema.TypeString, Optional: true, - Computed: true, }, // Computed From 857b3275d81d8be2b4512ba7b47667d150fb4974 Mon Sep 17 00:00:00 2001 From: Igor Kuzevanov Date: Thu, 16 May 2024 02:13:50 +0000 Subject: [PATCH 08/13] Added - Support for ADB-S: Customer Managed Keys via Azure Key Vault and AWS KMS --- .../autonomous_database_encryption_key.tf | 42 ++ .../database_autonomous_database_test.go | 50 +- ...atabase_autonomous_database_data_source.go | 16 + .../database_autonomous_database_resource.go | 452 ++++++++++++++++++ ...autonomous_databases_clones_data_source.go | 171 +++++++ ...tabase_autonomous_databases_data_source.go | 16 + ...utonomous_container_database.html.markdown | 6 +- ...tonomous_container_databases.html.markdown | 6 +- ...database_autonomous_database.html.markdown | 32 ++ ...atabase_autonomous_databases.html.markdown | 45 +- ..._autonomous_databases_clones.html.markdown | 34 +- ...utonomous_container_database.html.markdown | 10 +- ...database_autonomous_database.html.markdown | 69 ++- 13 files changed, 933 insertions(+), 16 deletions(-) create mode 100644 examples/database/adb/encryption_key/autonomous_database_encryption_key.tf diff --git a/examples/database/adb/encryption_key/autonomous_database_encryption_key.tf b/examples/database/adb/encryption_key/autonomous_database_encryption_key.tf new file mode 100644 index 00000000000..a28c20f0d48 --- /dev/null +++ b/examples/database/adb/encryption_key/autonomous_database_encryption_key.tf @@ -0,0 +1,42 @@ +// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. +// Licensed under the Mozilla Public License v2.0 + +variable "tenancy_ocid" { +} + +variable "user_ocid" { +} + +variable "fingerprint" { +} + +variable "private_key_path" { +} + +variable "region" { +} + +variable "compartment_ocid" { +} + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region +} + +resource "oci_database_autonomous_database" "test_autonomous_database" { + admin_password = "BEstrO0ng_#11" + compartment_id = var.compartment_ocid + cpu_core_count = "1" + data_storage_size_in_tbs = "1" + db_name = "Xsk5djnfdl23423" + db_version = "19c" + db_workload = "AJD" + license_model = "LICENSE_INCLUDED" + encryption_key { + autonomous_database_provider = "ORACLE_MANAGED" + } +} \ No newline at end of file diff --git a/internal/integrationtest/database_autonomous_database_test.go b/internal/integrationtest/database_autonomous_database_test.go index f95d7163dee..9721865a883 100644 --- a/internal/integrationtest/database_autonomous_database_test.go +++ b/internal/integrationtest/database_autonomous_database_test.go @@ -216,7 +216,11 @@ var ( DatabaseAutonomousDatabaseLongTermBackupDelete = map[string]interface{}{ "is_disabled": acctest.Representation{RepType: acctest.Optional, Create: `true`}, } - + DatabaseAutonomousDatabaseEncryptionKeyRepresentation = map[string]interface{}{ + "kms_key_id": acctest.Representation{RepType: acctest.Required, Update: `${lookup(data.oci_kms_keys.test_keys_dependency.keys[0], "id")}`}, + "vault_id": acctest.Representation{RepType: acctest.Required, Update: kmsVaultId}, + "autonomous_database_provider": acctest.Representation{RepType: acctest.Required, Update: `OCI`}, + } DatabaseAutonomousDatabaseResourcePoolSummaryRepresentation = map[string]interface{}{ "is_disabled": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, "pool_size": acctest.Representation{RepType: acctest.Optional, Create: `128`, Update: `256`}, @@ -1623,6 +1627,50 @@ func TestDatabaseAutonomousDatabaseResource_basic(t *testing.T) { }, ), }, + //36. Remove any previously created resources + { + Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies, + }, + //37. Create ADB using default Oracle Managed key + { + Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Required, acctest.Create, DatabaseAutonomousDatabaseRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#11"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "1"), + resource.TestCheckResourceAttr(resourceName, "db_name", adbName), + // verify computed field db_workload to be defaulted to OLTP + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "encryption_key.#", "1"), + resource.TestCheckResourceAttr(resourceName, "encryption_key.0.autonomous_database_provider", "ORACLE_MANAGED"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + //38. Update ADB using encryptionKey + { + Config: config + compartmentIdVariableStr + DatabaseAutonomousDatabaseResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Required, acctest.Update, + acctest.RepresentationCopyWithRemovedProperties(acctest.RepresentationCopyWithNewProperties(DatabaseAutonomousDatabaseRepresentation, map[string]interface{}{ + "encryption_key": acctest.RepresentationGroup{RepType: acctest.Required, Group: DatabaseAutonomousDatabaseEncryptionKeyRepresentation}, + }), []string{"admin_password"})), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "encryption_key.#", "1"), + resource.TestCheckResourceAttr(resourceName, "encryption_key.0.autonomous_database_provider", "OCI"), + resource.TestCheckResourceAttrSet(resourceName, "encryption_key.0.kms_key_id"), + resource.TestCheckResourceAttrSet(resourceName, "encryption_key.0.vault_id"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + fmt.Println(resId) + return err + }, + ), + }, }) } diff --git a/internal/service/database/database_autonomous_database_data_source.go b/internal/service/database/database_autonomous_database_data_source.go index 8921927845b..36ae6d87604 100644 --- a/internal/service/database/database_autonomous_database_data_source.go +++ b/internal/service/database/database_autonomous_database_data_source.go @@ -201,6 +201,22 @@ func (s *DatabaseAutonomousDatabaseDataSourceCrud) SetData() error { s.D.Set("display_name", *s.Res.DisplayName) } + if s.Res.EncryptionKey != nil { + encryptionKeyArray := []interface{}{} + if encryptionKeyMap := AutonomousDatabaseEncryptionKeyDetailsToMap(&s.Res.EncryptionKey); encryptionKeyMap != nil { + encryptionKeyArray = append(encryptionKeyArray, encryptionKeyMap) + } + s.D.Set("encryption_key", encryptionKeyArray) + } else { + s.D.Set("encryption_key", nil) + } + + encryptionKeyHistoryEntry := []interface{}{} + for _, item := range s.Res.EncryptionKeyHistoryEntry { + encryptionKeyHistoryEntry = append(encryptionKeyHistoryEntry, AutonomousDatabaseEncryptionKeyHistoryEntryToMap(item)) + } + s.D.Set("encryption_key_history_entry", encryptionKeyHistoryEntry) + if s.Res.FailedDataRecoveryInSeconds != nil { s.D.Set("failed_data_recovery_in_seconds", *s.Res.FailedDataRecoveryInSeconds) } diff --git a/internal/service/database/database_autonomous_database_resource.go b/internal/service/database/database_autonomous_database_resource.go index 09320e8693b..3874cc82ece 100644 --- a/internal/service/database/database_autonomous_database_resource.go +++ b/internal/service/database/database_autonomous_database_resource.go @@ -243,6 +243,100 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { Optional: true, Computed: true, }, + "encryption_key": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + "arn_role": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "autonomous_database_provider": { + Type: schema.TypeString, + Optional: true, + Computed: true, + DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff, + ValidateFunc: validation.StringInSlice([]string{ + "AWS", + "AZURE", + "OCI", + "OKV", + "ORACLE_MANAGED", + }, true), + }, + "certificate_directory_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "certificate_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "directory_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "external_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "key_arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "key_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "okv_kms_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "okv_uri": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "service_endpoint_uri": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "vault_uri": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + // Computed + }, + }, + }, "freeform_tags": { Type: schema.TypeMap, Optional: true, @@ -776,6 +870,92 @@ func DatabaseAutonomousDatabaseResource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "encryption_key_history_entry": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "encryption_key": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "arn_role": { + Type: schema.TypeString, + Computed: true, + }, + "autonomous_database_provider": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_directory_name": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_id": { + Type: schema.TypeString, + Computed: true, + }, + "directory_name": { + Type: schema.TypeString, + Computed: true, + }, + "external_id": { + Type: schema.TypeString, + Computed: true, + }, + "key_arn": { + Type: schema.TypeString, + Computed: true, + }, + "key_name": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "okv_kms_key": { + Type: schema.TypeString, + Computed: true, + }, + "okv_uri": { + Type: schema.TypeString, + Computed: true, + }, + "service_endpoint_uri": { + Type: schema.TypeString, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Computed: true, + }, + "vault_uri": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "time_activated": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "failed_data_recovery_in_seconds": { Type: schema.TypeInt, Computed: true, @@ -1720,6 +1900,17 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) Update() error { request.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok && s.D.HasChange("encryption_key") { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + request.EncryptionKey = tmp + } + } + if dbName, ok := s.D.GetOkExists("db_name"); ok && s.D.HasChange("db_name") { tmp := dbName.(string) request.DbName = &tmp @@ -2136,6 +2327,22 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) SetData() error { s.D.Set("display_name", *s.Res.DisplayName) } + if s.Res.EncryptionKey != nil { + encryptionKeyArray := []interface{}{} + if encryptionKeyMap := AutonomousDatabaseEncryptionKeyDetailsToMap(&s.Res.EncryptionKey); encryptionKeyMap != nil { + encryptionKeyArray = append(encryptionKeyArray, encryptionKeyMap) + } + s.D.Set("encryption_key", encryptionKeyArray) + } else { + s.D.Set("encryption_key", nil) + } + + encryptionKeyHistoryEntry := []interface{}{} + for _, item := range s.Res.EncryptionKeyHistoryEntry { + encryptionKeyHistoryEntry = append(encryptionKeyHistoryEntry, AutonomousDatabaseEncryptionKeyHistoryEntryToMap(item)) + } + s.D.Set("encryption_key_history_entry", encryptionKeyHistoryEntry) + if s.Res.FailedDataRecoveryInSeconds != nil { s.D.Set("failed_data_recovery_in_seconds", *s.Res.FailedDataRecoveryInSeconds) } @@ -2571,6 +2778,181 @@ func AutonomousDatabaseConnectionUrlsToMap(obj *oci_database.AutonomousDatabaseC return result } +func (s *DatabaseAutonomousDatabaseResourceCrud) mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat string) (oci_database.AutonomousDatabaseEncryptionKeyDetails, error) { + var baseObject oci_database.AutonomousDatabaseEncryptionKeyDetails + //discriminator + providerRaw, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "autonomous_database_provider")) + var provider string + if ok { + provider = providerRaw.(string) + } else { + provider = "" // default value + } + switch strings.ToLower(provider) { + case strings.ToLower("AWS"): + details := oci_database.AwsKeyDetails{} + if arnRole, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "arn_role")); ok { + tmp := arnRole.(string) + details.ArnRole = &tmp + } + if externalId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "external_id")); ok { + tmp := externalId.(string) + details.ExternalId = &tmp + } + if keyArn, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "key_arn")); ok { + tmp := keyArn.(string) + details.KeyArn = &tmp + } + if serviceEndpointUri, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "service_endpoint_uri")); ok { + tmp := serviceEndpointUri.(string) + details.ServiceEndpointUri = &tmp + } + baseObject = details + case strings.ToLower("AZURE"): + details := oci_database.AzureKeyDetails{} + if keyName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "key_name")); ok { + tmp := keyName.(string) + details.KeyName = &tmp + } + if vaultUri, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_uri")); ok { + tmp := vaultUri.(string) + details.VaultUri = &tmp + } + baseObject = details + case strings.ToLower("OCI"): + details := oci_database.OciKeyDetails{} + if kmsKeyId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "kms_key_id")); ok { + tmp := kmsKeyId.(string) + details.KmsKeyId = &tmp + } + if vaultId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "vault_id")); ok { + tmp := vaultId.(string) + details.VaultId = &tmp + } + baseObject = details + case strings.ToLower("OKV"): + details := oci_database.OkvKeyDetails{} + if certificateDirectoryName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "certificate_directory_name")); ok { + tmp := certificateDirectoryName.(string) + details.CertificateDirectoryName = &tmp + } + if certificateId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "certificate_id")); ok { + tmp := certificateId.(string) + details.CertificateId = &tmp + } + if directoryName, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "directory_name")); ok { + tmp := directoryName.(string) + details.DirectoryName = &tmp + } + if okvKmsKey, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "okv_kms_key")); ok { + tmp := okvKmsKey.(string) + details.OkvKmsKey = &tmp + } + if okvUri, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "okv_uri")); ok { + tmp := okvUri.(string) + details.OkvUri = &tmp + } + baseObject = details + case strings.ToLower("ORACLE_MANAGED"): + details := oci_database.OracleManagedKeyDetails{} + baseObject = details + default: + return nil, fmt.Errorf("unknown provider '%v' was specified", provider) + } + return baseObject, nil +} + +func AutonomousDatabaseEncryptionKeyDetailsToMap(obj *oci_database.AutonomousDatabaseEncryptionKeyDetails) map[string]interface{} { + result := map[string]interface{}{} + switch v := (*obj).(type) { + case oci_database.AwsKeyDetails: + result["autonomous_database_provider"] = "AWS" + + if v.ArnRole != nil { + result["arn_role"] = string(*v.ArnRole) + } + + if v.ExternalId != nil { + result["external_id"] = string(*v.ExternalId) + } + + if v.KeyArn != nil { + result["key_arn"] = string(*v.KeyArn) + } + + if v.ServiceEndpointUri != nil { + result["service_endpoint_uri"] = string(*v.ServiceEndpointUri) + } + case oci_database.AzureKeyDetails: + result["autonomous_database_provider"] = "AZURE" + + if v.KeyName != nil { + result["key_name"] = string(*v.KeyName) + } + + if v.VaultUri != nil { + result["vault_uri"] = string(*v.VaultUri) + } + case oci_database.OciKeyDetails: + result["autonomous_database_provider"] = "OCI" + + if v.KmsKeyId != nil { + result["kms_key_id"] = string(*v.KmsKeyId) + } + + if v.VaultId != nil { + result["vault_id"] = string(*v.VaultId) + } + case oci_database.OkvKeyDetails: + result["autonomous_database_provider"] = "OKV" + + if v.CertificateDirectoryName != nil { + result["certificate_directory_name"] = string(*v.CertificateDirectoryName) + } + + if v.CertificateId != nil { + result["certificate_id"] = string(*v.CertificateId) + } + + if v.DirectoryName != nil { + result["directory_name"] = string(*v.DirectoryName) + } + + if v.OkvKmsKey != nil { + result["okv_kms_key"] = string(*v.OkvKmsKey) + } + + if v.OkvUri != nil { + result["okv_uri"] = string(*v.OkvUri) + } + case oci_database.OracleManagedKeyDetails: + result["autonomous_database_provider"] = "ORACLE_MANAGED" + default: + log.Printf("[WARN] Received 'provider' of unknown type %v", *obj) + return nil + } + + return result +} + +func AutonomousDatabaseEncryptionKeyHistoryEntryToMap(obj oci_database.AutonomousDatabaseEncryptionKeyHistoryEntry) map[string]interface{} { + result := map[string]interface{}{} + + if obj.EncryptionKey != nil { + encryptionKeyArray := []interface{}{} + if encryptionKeyMap := AutonomousDatabaseEncryptionKeyDetailsToMap(&obj.EncryptionKey); encryptionKeyMap != nil { + encryptionKeyArray = append(encryptionKeyArray, encryptionKeyMap) + } + result["encryption_key"] = encryptionKeyArray + } + + if obj.TimeActivated != nil { + result["time_activated"] = obj.TimeActivated.String() + } + + return result +} + func AutonomousDatabaseKeyHistoryEntryToMap(obj oci_database.AutonomousDatabaseKeyHistoryEntry) map[string]interface{} { result := map[string]interface{}{} @@ -2989,6 +3371,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := displayName.(string) details.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + details.EncryptionKey = tmp + } + } if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -3277,6 +3669,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := displayName.(string) details.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + details.EncryptionKey = tmp + } + } if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -3560,6 +3962,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := displayName.(string) details.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + details.EncryptionKey = tmp + } + } if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -3835,6 +4247,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := displayName.(string) details.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + details.EncryptionKey = tmp + } + } if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -4098,6 +4520,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := displayName.(string) details.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + details.EncryptionKey = tmp + } + } if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -4610,6 +5042,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := displayName.(string) details.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + details.EncryptionKey = tmp + } + } if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } @@ -4880,6 +5322,16 @@ func (s *DatabaseAutonomousDatabaseResourceCrud) populateTopLevelPolymorphicCrea tmp := displayName.(string) details.DisplayName = &tmp } + if encryptionKey, ok := s.D.GetOkExists("encryption_key"); ok { + if tmpList := encryptionKey.([]interface{}); len(tmpList) > 0 { + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "encryption_key", 0) + tmp, err := s.mapToAutonomousDatabaseEncryptionKeyDetails(fieldKeyFormat) + if err != nil { + return err + } + details.EncryptionKey = tmp + } + } if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } diff --git a/internal/service/database/database_autonomous_databases_clones_data_source.go b/internal/service/database/database_autonomous_databases_clones_data_source.go index ab796f62741..1464b90ecd2 100644 --- a/internal/service/database/database_autonomous_databases_clones_data_source.go +++ b/internal/service/database/database_autonomous_databases_clones_data_source.go @@ -385,6 +385,161 @@ func DatabaseAutonomousDatabasesClonesDataSource() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "encryption_key": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "arn_role": { + Type: schema.TypeString, + Computed: true, + }, + "autonomous_databases_clone_provider": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_directory_name": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_id": { + Type: schema.TypeString, + Computed: true, + }, + "directory_name": { + Type: schema.TypeString, + Computed: true, + }, + "external_id": { + Type: schema.TypeString, + Computed: true, + }, + "key_arn": { + Type: schema.TypeString, + Computed: true, + }, + "key_name": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "okv_kms_key": { + Type: schema.TypeString, + Computed: true, + }, + "okv_uri": { + Type: schema.TypeString, + Computed: true, + }, + "service_endpoint_uri": { + Type: schema.TypeString, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Computed: true, + }, + "vault_uri": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "encryption_key_history_entry": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "encryption_key": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + + // Optional + + // Computed + "arn_role": { + Type: schema.TypeString, + Computed: true, + }, + "autonomous_databases_clone_provider": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_directory_name": { + Type: schema.TypeString, + Computed: true, + }, + "certificate_id": { + Type: schema.TypeString, + Computed: true, + }, + "directory_name": { + Type: schema.TypeString, + Computed: true, + }, + "external_id": { + Type: schema.TypeString, + Computed: true, + }, + "key_arn": { + Type: schema.TypeString, + Computed: true, + }, + "key_name": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "okv_kms_key": { + Type: schema.TypeString, + Computed: true, + }, + "okv_uri": { + Type: schema.TypeString, + Computed: true, + }, + "service_endpoint_uri": { + Type: schema.TypeString, + Computed: true, + }, + "vault_id": { + Type: schema.TypeString, + Computed: true, + }, + "vault_uri": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "time_activated": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, "failed_data_recovery_in_seconds": { Type: schema.TypeInt, Computed: true, @@ -1191,6 +1346,22 @@ func (s *DatabaseAutonomousDatabasesClonesDataSourceCrud) SetData() error { autonomousDatabasesClone["display_name"] = *r.DisplayName } + if r.EncryptionKey != nil { + encryptionKeyArray := []interface{}{} + if encryptionKeyMap := AutonomousDatabaseEncryptionKeyDetailsToMap(&r.EncryptionKey); encryptionKeyMap != nil { + encryptionKeyArray = append(encryptionKeyArray, encryptionKeyMap) + } + autonomousDatabasesClone["encryption_key"] = encryptionKeyArray + } else { + autonomousDatabasesClone["encryption_key"] = nil + } + + encryptionKeyHistoryEntry := []interface{}{} + for _, item := range r.EncryptionKeyHistoryEntry { + encryptionKeyHistoryEntry = append(encryptionKeyHistoryEntry, AutonomousDatabaseEncryptionKeyHistoryEntryToMap(item)) + } + autonomousDatabasesClone["encryption_key_history_entry"] = encryptionKeyHistoryEntry + if r.FailedDataRecoveryInSeconds != nil { autonomousDatabasesClone["failed_data_recovery_in_seconds"] = *r.FailedDataRecoveryInSeconds } diff --git a/internal/service/database/database_autonomous_databases_data_source.go b/internal/service/database/database_autonomous_databases_data_source.go index a59cfd1e71b..c162bc0bd46 100644 --- a/internal/service/database/database_autonomous_databases_data_source.go +++ b/internal/service/database/database_autonomous_databases_data_source.go @@ -328,6 +328,22 @@ func (s *DatabaseAutonomousDatabasesDataSourceCrud) SetData() error { autonomousDatabase["display_name"] = *r.DisplayName } + if r.EncryptionKey != nil { + encryptionKeyArray := []interface{}{} + if encryptionKeyMap := AutonomousDatabaseEncryptionKeyDetailsToMap(&r.EncryptionKey); encryptionKeyMap != nil { + encryptionKeyArray = append(encryptionKeyArray, encryptionKeyMap) + } + autonomousDatabase["encryption_key"] = encryptionKeyArray + } else { + autonomousDatabase["encryption_key"] = nil + } + + encryptionKeyHistoryEntry := []interface{}{} + for _, item := range r.EncryptionKeyHistoryEntry { + encryptionKeyHistoryEntry = append(encryptionKeyHistoryEntry, AutonomousDatabaseEncryptionKeyHistoryEntryToMap(item)) + } + autonomousDatabase["encryption_key_history_entry"] = encryptionKeyHistoryEntry + if r.FailedDataRecoveryInSeconds != nil { autonomousDatabase["failed_data_recovery_in_seconds"] = *r.FailedDataRecoveryInSeconds } diff --git a/website/docs/d/database_autonomous_container_database.html.markdown b/website/docs/d/database_autonomous_container_database.html.markdown index 683cbc983d6..88be91481bd 100644 --- a/website/docs/d/database_autonomous_container_database.html.markdown +++ b/website/docs/d/database_autonomous_container_database.html.markdown @@ -49,12 +49,12 @@ The following attributes are exported: * `compartment_id` - The OCID of the compartment. * `compute_model` - The compute model of the Autonomous Container Database. For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (ECPUs or OCPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ECPU compute model is the recommended model and OCPU compute model is legacy. See [Compute Models in Autonomous Database on Dedicated Exadata Infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. * `db_name` - The Database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, starting with an alphabetic character, followed by 1 to 7 alphanumeric characters. -* `db_split_threshold` - 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. +* `db_split_threshold` - The CPU value beyond which an Autonomous Database will be opened across multiple nodes. The default value of this attribute is 16 for OCPUs and 64 for ECPUs. * `db_unique_name` - **Deprecated.** The `DB_UNIQUE_NAME` value is set by Oracle Cloud Infrastructure. Do not specify a value for this parameter. Specifying a value for this field will cause Terraform operations to fail. * `db_version` - Oracle Database version of the Autonomous Container Database. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `display_name` - The user-provided name for the Autonomous Container Database. -* `distribution_affinity` - 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. +* `distribution_affinity` - Determines whether an Autonomous Database must be opened across the maximum number of nodes or the least number of nodes. By default, Minimum nodes is selected. * `dst_file_version` - DST Time-zone File version of the Autonomous Container Database. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The OCID of the Autonomous Container Database. @@ -109,5 +109,5 @@ The following attributes are exported: * `total_cpus` - The number of CPUs allocated to the Autonomous VM cluster.
For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). * `version_preference` - The next maintenance version preference. -* `vm_failover_reservation` - The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. +* `vm_failover_reservation` - The percentage of CPUs reserved across nodes to support node failover. Allowed values are 0%, 25%, and 50%, with 50% being the default option. diff --git a/website/docs/d/database_autonomous_container_databases.html.markdown b/website/docs/d/database_autonomous_container_databases.html.markdown index 6257e9dda5e..a46608f4e4d 100644 --- a/website/docs/d/database_autonomous_container_databases.html.markdown +++ b/website/docs/d/database_autonomous_container_databases.html.markdown @@ -74,12 +74,12 @@ The following attributes are exported: * `compartment_id` - The OCID of the compartment. * `compute_model` - The compute model of the Autonomous Container Database. For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (ECPUs or OCPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ECPU compute model is the recommended model and OCPU compute model is legacy. See [Compute Models in Autonomous Database on Dedicated Exadata Infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. * `db_name` - The Database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, starting with an alphabetic character, followed by 1 to 7 alphanumeric characters. -* `db_split_threshold` - 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. +* `db_split_threshold` - The CPU value beyond which an Autonomous Database will be opened across multiple nodes. The default value of this attribute is 16 for OCPUs and 64 for ECPUs. * `db_unique_name` - **Deprecated.** The `DB_UNIQUE_NAME` value is set by Oracle Cloud Infrastructure. Do not specify a value for this parameter. Specifying a value for this field will cause Terraform operations to fail. * `db_version` - Oracle Database version of the Autonomous Container Database. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `display_name` - The user-provided name for the Autonomous Container Database. -* `distribution_affinity` - 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. +* `distribution_affinity` - Determines whether an Autonomous Database must be opened across the maximum number of nodes or the least number of nodes. By default, Minimum nodes is selected. * `dst_file_version` - DST Time-zone File version of the Autonomous Container Database. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The OCID of the Autonomous Container Database. @@ -134,5 +134,5 @@ The following attributes are exported: * `total_cpus` - The number of CPUs allocated to the Autonomous VM cluster.
For Autonomous Databases on Dedicated Exadata Infrastructure, the CPU type (OCPUs or ECPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). * `version_preference` - The next maintenance version preference. -* `vm_failover_reservation` - The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. +* `vm_failover_reservation` - The percentage of CPUs reserved across nodes to support node failover. Allowed values are 0%, 25%, and 50%, with 50% being the default option. diff --git a/website/docs/d/database_autonomous_database.html.markdown b/website/docs/d/database_autonomous_database.html.markdown index b691ef99684..7570ae45ba4 100644 --- a/website/docs/d/database_autonomous_database.html.markdown +++ b/website/docs/d/database_autonomous_database.html.markdown @@ -112,6 +112,38 @@ The following attributes are exported: * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `disaster_recovery_region_type` - **Deprecated.** The disaster recovery (DR) region type of the Autonomous Database. For Autonomous Database Serverless instances, DR associations have designated primary and standby regions. These region types do not change when the database changes roles. The standby region in DR associations can be the same region as the primary region, or they can be in a remote regions. Some database administration operations may be available only in the primary region of the DR association, and cannot be performed when the database using the primary role is operating in a remote region. * `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique. +* `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_database_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI +* `encryption_key_history_entry` - Key History Entry. + * `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_database_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI + * `time_activated` - The date and time the encryption key was activated. * `failed_data_recovery_in_seconds` - Indicates the number of seconds of data loss for a Data Guard failover. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous Database. diff --git a/website/docs/d/database_autonomous_databases.html.markdown b/website/docs/d/database_autonomous_databases.html.markdown index 2a9d6cfe492..fcf4ec43c42 100644 --- a/website/docs/d/database_autonomous_databases.html.markdown +++ b/website/docs/d/database_autonomous_databases.html.markdown @@ -42,7 +42,18 @@ data "oci_database_autonomous_databases" "test_autonomous_databases" { The following arguments are supported: -* `autonomous_database_id` - (Required) The database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +* `autonomous_container_database_id` - (Optional) The Autonomous Container Database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +* `compartment_id` - (Required) The compartment [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). +* `db_version` - (Optional) A filter to return only autonomous database resources that match the specified dbVersion. +* `db_workload` - (Optional) A filter to return only autonomous database resources that match the specified workload type. +* `display_name` - (Optional) A filter to return only resources that match the entire display name given. The match is not case sensitive. +* `infrastructure_type` - (Optional) A filter to return only resources that match the given Infrastructure Type. +* `is_data_guard_enabled` - (Optional) A filter to return only resources that have Data Guard enabled. +* `is_free_tier` - (Optional) Filter on the value of the resource's 'isFreeTier' property. A value of `true` returns only Always Free resources. A value of `false` excludes Always Free resources from the returned results. Omitting this parameter returns both Always Free and paid resources. +* `is_refreshable_clone` - (Optional) Filter on the value of the resource's 'isRefreshableClone' property. A value of `true` returns only refreshable clones. A value of `false` excludes refreshable clones from the returned results. Omitting this parameter returns both refreshable clones and databases that are not refreshable clones. +* `is_resource_pool_leader` - (Optional) Filter if the resource is the resource pool leader. A value of `true` returns only resource pool leader. +* `resource_pool_leader_id` - (Optional) The database [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resourcepool Leader Autonomous Database. +* `state` - (Optional) A filter to return only resources that match the given lifecycle state exactly. ## Attributes Reference @@ -128,6 +139,38 @@ The following attributes are exported: * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `disaster_recovery_region_type` - **Deprecated.** The disaster recovery (DR) region type of the Autonomous Database. For Autonomous Database Serverless instances, DR associations have designated primary and standby regions. These region types do not change when the database changes roles. The standby region in DR associations can be the same region as the primary region, or they can be in a remote regions. Some database administration operations may be available only in the primary region of the DR association, and cannot be performed when the database using the primary role is operating in a remote region. * `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique. +* `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_database_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI +* `encryption_key_history_entry` - Key History Entry. + * `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_database_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI + * `time_activated` - The date and time the encryption key was activated. * `failed_data_recovery_in_seconds` - Indicates the number of seconds of data loss for a Data Guard failover. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous Database. diff --git a/website/docs/d/database_autonomous_databases_clones.html.markdown b/website/docs/d/database_autonomous_databases_clones.html.markdown index 6815b887e84..56abcc3724f 100644 --- a/website/docs/d/database_autonomous_databases_clones.html.markdown +++ b/website/docs/d/database_autonomous_databases_clones.html.markdown @@ -4,7 +4,7 @@ layout: "oci" page_title: "Oracle Cloud Infrastructure: oci_database_autonomous_databases_clones" sidebar_current: "docs-oci-datasource-database-autonomous_databases_clones" description: |- -Provides the list of Autonomous Databases Clones in Oracle Cloud Infrastructure Database service + Provides the list of Autonomous Databases Clones in Oracle Cloud Infrastructure Database service --- # Data Source: oci_database_autonomous_databases_clones @@ -128,6 +128,38 @@ The following attributes are exported: * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `disaster_recovery_region_type` - **Deprecated.** The disaster recovery (DR) region type of the Autonomous Database. For Autonomous Database Serverless instances, DR associations have designated primary and standby regions. These region types do not change when the database changes roles. The standby region in DR associations can be the same region as the primary region, or they can be in a remote regions. Some database administration operations may be available only in the primary region of the DR association, and cannot be performed when the database using the primary role is operating in a remote region. * `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique. +* `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_databases_clone_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI +* `encryption_key_history_entry` - Key History Entry. + * `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_databases_clone_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI + * `time_activated` - The date and time the encryption key was activated. * `failed_data_recovery_in_seconds` - Indicates the number of seconds of data loss for a Data Guard failover. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous Database. diff --git a/website/docs/r/database_autonomous_container_database.html.markdown b/website/docs/r/database_autonomous_container_database.html.markdown index 3611df4db30..5585baa8c23 100644 --- a/website/docs/r/database_autonomous_container_database.html.markdown +++ b/website/docs/r/database_autonomous_container_database.html.markdown @@ -128,12 +128,12 @@ The following arguments are supported: * `compartment_id` - (Optional) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment containing the Autonomous Container Database. * `database_software_image_id` - (Optional) The Autonomous Database Software Image [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * `db_name` - (Optional) The Database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, starting with an alphabetic character, followed by 1 to 7 alphanumeric characters. -* `db_split_threshold` - (Optional) 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. +* `db_split_threshold` - (Optional) The CPU value beyond which an Autonomous Database will be opened across multiple nodes. The default value of this attribute is 16 for OCPUs and 64 for ECPUs. * `db_unique_name` - (Optional) **Deprecated.** The `DB_UNIQUE_NAME` value is set by Oracle Cloud Infrastructure. Do not specify a value for this parameter. Specifying a value for this field will cause Terraform operations to fail. * `db_version` - (Optional) The base version for the Autonomous Container Database. * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `display_name` - (Required) (Updatable) The display name for the Autonomous Container Database. -* `distribution_affinity` - (Optional) 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. +* `distribution_affinity` - (Optional) Determines whether an Autonomous Database must be opened across a minimum or maximum of nodes. By default, Minimum nodes is selected. * `fast_start_fail_over_lag_limit_in_seconds` - (Optional) The lag time for my preference based on data loss tolerance in seconds. * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `is_dst_file_update_enabled` - (Optional) (Updatable) Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner. @@ -212,12 +212,12 @@ The following attributes are exported: * `compartment_id` - The OCID of the compartment. * `compute_model` - The compute model of the Autonomous Container Database. For Autonomous Database on Dedicated Exadata Infrastructure, the CPU type (ECPUs or OCPUs) is determined by the parent Autonomous Exadata VM Cluster's compute model. ECPU compute model is the recommended model and OCPU compute model is legacy. See [Compute Models in Autonomous Database on Dedicated Exadata Infrastructure](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbak) for more details. * `db_name` - The Database name for the Autonomous Container Database. The name must be unique within the Cloud Autonomous VM Cluster, starting with an alphabetic character, followed by 1 to 7 alphanumeric characters. -* `db_split_threshold` - 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. +* `db_split_threshold` - The CPU value beyond which an Autonomous Database will be opened across multiple nodes. The default value of this attribute is 16 for OCPUs and 64 for ECPUs. * `db_unique_name` - **Deprecated.** The `DB_UNIQUE_NAME` value is set by Oracle Cloud Infrastructure. Do not specify a value for this parameter. Specifying a value for this field will cause Terraform operations to fail. * `db_version` - Oracle Database version of the Autonomous Container Database. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `display_name` - The user-provided name for the Autonomous Container Database. -* `distribution_affinity` - 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. +* `distribution_affinity` - Determines whether an Autonomous Database must be opened across the maximum number of nodes or the least number of nodes. By default, Minimum nodes is selected. * `dst_file_version` - DST Time-zone File version of the Autonomous Container Database. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The OCID of the Autonomous Container Database. @@ -280,7 +280,7 @@ The following attributes are exported: * `total_cpus` - The number of CPUs allocated to the Autonomous VM cluster. * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). * `version_preference` - The next maintenance version preference. -* `vm_failover_reservation` - The percentage of CPUs to reserve for a single node Autonomous Database, in increments of 25. +* `vm_failover_reservation` - The percentage of CPUs reserved across nodes to support node failover. Allowed values are 0%, 25%, and 50%, with 50% being the default option. ## Timeouts diff --git a/website/docs/r/database_autonomous_database.html.markdown b/website/docs/r/database_autonomous_database.html.markdown index c19ae13a039..75e4e086123 100644 --- a/website/docs/r/database_autonomous_database.html.markdown +++ b/website/docs/r/database_autonomous_database.html.markdown @@ -61,6 +61,24 @@ resource "oci_database_autonomous_database" "test_autonomous_database" { defined_tags = var.autonomous_database_defined_tags disaster_recovery_type = var.autonomous_database_disaster_recovery_type display_name = var.autonomous_database_display_name + encryption_key { + + #Optional + arn_role = var.autonomous_database_encryption_key_arn_role + autonomous_database_provider = var.autonomous_database_encryption_key_autonomous_database_provider + certificate_directory_name = var.autonomous_database_encryption_key_certificate_directory_name + certificate_id = oci_apigateway_certificate.test_certificate.id + directory_name = var.autonomous_database_encryption_key_directory_name + external_id = oci_database_external.test_external.id + key_arn = var.autonomous_database_encryption_key_key_arn + key_name = oci_kms_key.test_key.name + kms_key_id = oci_kms_key.test_key.id + okv_kms_key = var.autonomous_database_encryption_key_okv_kms_key + okv_uri = var.autonomous_database_encryption_key_okv_uri + service_endpoint_uri = var.autonomous_database_encryption_key_service_endpoint_uri + vault_id = oci_kms_vault.test_vault.id + vault_uri = var.autonomous_database_encryption_key_vault_uri + } freeform_tags = {"Department"= "Finance"} in_memory_percentage = var.autonomous_database_in_memory_percentage is_access_control_enabled = var.autonomous_database_is_access_control_enabled @@ -157,7 +175,7 @@ The following arguments are supported: * `data_storage_size_in_tbs` - (Optional) (Updatable) The size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed. For Autonomous Databases on dedicated Exadata infrastructure, the maximum storage value is determined by the infrastructure shape. See [Characteristics of Infrastructure Shapes](https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. A full Exadata service is allocated when the Autonomous Database size is set to the upper limit (384 TB). **Note:** This parameter cannot be used with the `dataStorageSizeInGBs` parameter. This input is ignored for Always Free resources. -* `database_edition` - (Optional) (Updatable) The Oracle Database Edition that applies to the Autonomous databases. It can be set to `ENTERPRISE_EDITION` or `STANDARD_EDITION`. +* `database_edition` - (Optional) (Updatable) The Oracle Database Edition that applies to the Autonomous databases. It can be set to `ENTERPRISE_EDITION` or `STANDARD_EDITION`. * `db_name` - (Optional) The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. It is required in all cases except when creating a cross-region Autonomous Data Guard standby instance or a cross-region disaster recovery standby instance. * `db_tools_details` - (Optional) (Updatable) The list of database tools details. @@ -177,6 +195,21 @@ The following arguments are supported: * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `disaster_recovery_type` - (Required when source=CROSS_TENANCY_DISASTER_RECOVERY) Indicates the disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. * `display_name` - (Optional) (Updatable) The user-friendly name for the Autonomous Database. The name does not have to be unique. +* `encryption_key` - (Optional) (Updatable) Details of the Autonomous Database encryption key. + * `arn_role` - (Applicable when provider=AWS) (Updatable) AWS ARN role + * `autonomous_database_provider` - (Optional) (Updatable) The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - (Required when provider=OKV) (Updatable) OKV certificate directory name + * `certificate_id` - (Applicable when provider=OKV) (Updatable) OKV certificate id + * `directory_name` - (Required when provider=OKV) (Updatable) OKV wallet directory name + * `external_id` - (Applicable when provider=AWS) (Updatable) AWS external ID + * `key_arn` - (Required when provider=AWS) (Updatable) AWS key ARN + * `key_name` - (Required when provider=AZURE) (Updatable) Azure key name + * `kms_key_id` - (Required when provider=OCI) (Updatable) The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - (Required when provider=OKV) (Updatable) UUID of OKV KMS Key + * `okv_uri` - (Required when provider=OKV) (Updatable) URI of OKV server + * `service_endpoint_uri` - (Required when provider=AWS) (Updatable) AWS key service endpoint URI + * `vault_id` - (Required when provider=OCI) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - (Required when provider=AZURE) (Updatable) Azure vault URI * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `in_memory_percentage` - (Optional) (Updatable) The percentage of the System Global Area(SGA) assigned to In-Memory tables in Autonomous Database. This property is applicable only to Autonomous Databases on the Exadata Cloud@Customer platform. * `is_access_control_enabled` - (Optional) (Updatable) Indicates if the database-level access control is enabled. If disabled, database access is defined by the network security rules. If enabled, database access is restricted to the IP addresses defined by the rules specified with the `whitelistedIps` property. While specifying `whitelistedIps` rules is optional, if database-level access control is enabled and no rules are specified, the database will become inaccessible. The rules can be added later using the `UpdateAutonomousDatabase` API operation or edit option in console. When creating a database clone, the desired access control setting should be specified. By default, database-level access control will be disabled for the clone. @@ -384,10 +417,42 @@ The following attributes are exported: * AJD - indicates an Autonomous JSON Database * APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. - This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. + This cannot be updated in parallel with any of the following: licenseModel, dbEdition, cpuCoreCount, computeCount, computeModel, adminPassword, whitelistedIps, isMTLSConnectionRequired, privateEndpointLabel, nsgIds, dbVersion, isRefreshable, dbName, scheduledOperations, dbToolsDetails, isLocalDataGuardEnabled, or isFreeTier. * `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). * `disaster_recovery_region_type` - **Deprecated** The disaster recovery (DR) region type of the Autonomous Database. For Serverless Autonomous Databases, DR associations have designated primary (`PRIMARY`) and standby (`REMOTE`) regions. These region types do not change when the database changes roles. The standby region in DR associations can be the same region as the primary region, or they can be in a remote regions. Some database administration operations may be available only in the primary region of the DR association, and cannot be performed when the database using the primary role is operating in a remote region. * `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique. +* `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_database_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI +* `encryption_key_history_entry` - Key History Entry. + * `encryption_key` - Details of the Autonomous Database encryption key. + * `arn_role` - AWS ARN role + * `autonomous_database_provider` - The provider for the Autonomous Database encryption key. + * `certificate_directory_name` - OKV certificate directory name + * `certificate_id` - OKV certificate id + * `directory_name` - OKV wallet directory name + * `external_id` - AWS external ID + * `key_arn` - AWS key ARN + * `key_name` - Azure key name + * `kms_key_id` - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + * `okv_kms_key` - UUID of OKV KMS Key + * `okv_uri` - URI of OKV server + * `service_endpoint_uri` - AWS key service endpoint URI + * `vault_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure [vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + * `vault_uri` - Azure vault URI + * `time_activated` - The date and time the encryption key was activated. * `failed_data_recovery_in_seconds` - Indicates the number of seconds of data loss for a Data Guard failover. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous Database. From fbb6541892e108659dbe347391b0d961dfe113fb Mon Sep 17 00:00:00 2001 From: Max Gao Date: Tue, 24 Sep 2024 19:23:04 +0000 Subject: [PATCH 09/13] Added - Support for FSS Resource Locking --- examples/storage/fss/export.tf | 15 ++ examples/storage/fss/file_system.tf | 24 +++ examples/storage/fss/file_system_clone.tf | 32 ++++ .../storage/fss/filesystem_snapshot_policy.tf | 8 + examples/storage/fss/mount_target.tf | 9 ++ examples/storage/fss/outbound_connector.tf | 8 + examples/storage/fss/snapshot.tf | 10 ++ examples/storage/fss/variables.tf | 12 ++ .../file_storage_export_test.go | 65 +++++++- .../file_storage_file_system_test.go | 78 +++++++++- ...storage_filesystem_snapshot_policy_test.go | 79 +++++++++- .../file_storage_mount_target_test.go | 85 ++++++++++- .../file_storage_outbound_connector_test.go | 79 +++++++++- .../file_storage_replication_test.go | 84 ++++++++++- .../file_storage_snapshot_test.go | 87 ++++++++++- .../file_storage_export_resource.go | 106 +++++++++++++ .../file_storage_exports_data_source.go | 6 + .../file_storage_file_system_resource.go | 132 +++++++++++++++++ .../file_storage_file_systems_data_source.go | 6 + ...ilesystem_snapshot_policies_data_source.go | 6 + ..._filesystem_snapshot_policy_data_source.go | 6 + ...age_filesystem_snapshot_policy_resource.go | 120 +++++++++++++++ .../file_storage_mount_target_resource.go | 139 ++++++++++++++++++ .../file_storage_mount_targets_data_source.go | 6 + ..._storage_outbound_connector_data_source.go | 6 + ...ile_storage_outbound_connector_resource.go | 111 ++++++++++++++ ...storage_outbound_connectors_data_source.go | 6 + .../file_storage_replication_data_source.go | 6 + .../file_storage_replication_resource.go | 112 ++++++++++++++ .../file_storage_replications_data_source.go | 6 + .../file_storage_snapshot_data_source.go | 6 + .../file_storage_snapshot_resource.go | 107 +++++++++++++- .../file_storage_snapshots_data_source.go | 6 + .../docs/d/file_storage_exports.html.markdown | 5 + .../d/file_storage_file_systems.html.markdown | 5 + ...filesystem_snapshot_policies.html.markdown | 5 + ...e_filesystem_snapshot_policy.html.markdown | 5 + .../file_storage_mount_targets.html.markdown | 5 + ...e_storage_outbound_connector.html.markdown | 5 + ..._storage_outbound_connectors.html.markdown | 5 + .../d/file_storage_replication.html.markdown | 5 + .../d/file_storage_replications.html.markdown | 5 + .../d/file_storage_snapshot.html.markdown | 5 + .../d/file_storage_snapshots.html.markdown | 5 + .../docs/r/file_storage_export.html.markdown | 19 +++ .../r/file_storage_file_system.html.markdown | 19 +++ ...e_filesystem_snapshot_policy.html.markdown | 19 +++ .../r/file_storage_mount_target.html.markdown | 21 +++ ...e_storage_outbound_connector.html.markdown | 19 +++ .../r/file_storage_replication.html.markdown | 19 +++ .../r/file_storage_snapshot.html.markdown | 19 +++ 51 files changed, 1734 insertions(+), 24 deletions(-) diff --git a/examples/storage/fss/export.tf b/examples/storage/fss/export.tf index 1b76d991c82..9127574019a 100644 --- a/examples/storage/fss/export.tf +++ b/examples/storage/fss/export.tf @@ -20,6 +20,14 @@ resource "oci_file_storage_export" "my_export_fs1_mt1" { identity_squash = "ALL" require_privileged_source_port = true } + locks { + #Required + type = var.locks_type + + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_export" "my_export_fs1_mt2" { @@ -34,6 +42,13 @@ resource "oci_file_storage_export" "my_export_fs2_mt1" { export_set_id = oci_file_storage_export_set.my_export_set_1.id file_system_id = oci_file_storage_file_system.my_fs_2.id path = var.export_path_fs2_mt1 + locks { + #Required + type = var.locks_type + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_export" "my_krb_export_krbfs_krbmt" { diff --git a/examples/storage/fss/file_system.tf b/examples/storage/fss/file_system.tf index 50026cb080b..27bcbc682f0 100644 --- a/examples/storage/fss/file_system.tf +++ b/examples/storage/fss/file_system.tf @@ -15,6 +15,14 @@ resource "oci_file_storage_file_system" "my_fs_1" { freeform_tags = { "Department" = "Finance" } + + locks { + #Required + type = var.locks_type + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_file_system" "my_fs_2" { @@ -31,6 +39,14 @@ resource "oci_file_storage_file_system" "my_fs_2" { freeform_tags = { "Department" = "Accounting" } + + locks { + #Required + type = var.locks_type + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_file_system" "my_file_system_with_fs_snapshot_policy" { @@ -48,6 +64,14 @@ resource "oci_file_storage_file_system" "my_file_system_with_fs_snapshot_policy" freeform_tags = { "Department" = "Accounting" } + + locks { + #Required + type = var.locks_type + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_file_system" "my_krb_file_system" { diff --git a/examples/storage/fss/file_system_clone.tf b/examples/storage/fss/file_system_clone.tf index 29485f46c94..d8a061b4745 100644 --- a/examples/storage/fss/file_system_clone.tf +++ b/examples/storage/fss/file_system_clone.tf @@ -6,6 +6,14 @@ resource "oci_file_storage_file_system" "my_fs_clone" { #Optional display_name = var.file_system_clone_display_name source_snapshot_id = oci_file_storage_snapshot.my_snapshot_clone.id + locks { + #Required + type = var.locks_type + + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_file_system" "my_fs_simple" { #Required @@ -29,6 +37,14 @@ resource "oci_file_storage_file_system" "my_fs_clone_with_detach" { display_name = var.file_system_clone_with_detach_display_name source_snapshot_id = oci_file_storage_snapshot.my_snapshot_clone_1.id clone_attach_status = var.clone_attach_status_value + + locks { + #Required + type = var.locks_type + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_file_system" "my_fs_simple_1" { #Required @@ -37,9 +53,25 @@ resource "oci_file_storage_file_system" "my_fs_simple_1" { #Optional display_name = var.file_system_simple_1_display_name + + locks { + #Required + type = var.locks_type + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_snapshot" "my_snapshot_clone_1" { #Required file_system_id = oci_file_storage_file_system.my_fs_simple_1.id name = var.snapshot_name_clone_1 + + locks { + #Required + type = var.locks_type + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } \ No newline at end of file diff --git a/examples/storage/fss/filesystem_snapshot_policy.tf b/examples/storage/fss/filesystem_snapshot_policy.tf index 5ad103855d6..5b409e6db31 100644 --- a/examples/storage/fss/filesystem_snapshot_policy.tf +++ b/examples/storage/fss/filesystem_snapshot_policy.tf @@ -24,4 +24,12 @@ resource "oci_file_storage_filesystem_snapshot_policy" "my_filesystem_snapshot_p # Commented out time_schedule_start as the date given should be a time in the future # time_schedule_start = "2096-01-02T15:04:05Z" } + locks { + #Required + type = var.locks_type + + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } diff --git a/examples/storage/fss/mount_target.tf b/examples/storage/fss/mount_target.tf index 8718a8f7f6f..a61ed1b4535 100644 --- a/examples/storage/fss/mount_target.tf +++ b/examples/storage/fss/mount_target.tf @@ -19,6 +19,15 @@ resource "oci_file_storage_mount_target" "my_mount_target_1" { requested_throughput = "1" nsg_ids = [oci_core_network_security_group.test_network_security_group.id] + + locks { + #Required + type = var.locks_type + + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } resource "oci_file_storage_mount_target" "my_mount_target_2" { diff --git a/examples/storage/fss/outbound_connector.tf b/examples/storage/fss/outbound_connector.tf index 6d0de69eaa2..b212121c3db 100644 --- a/examples/storage/fss/outbound_connector.tf +++ b/examples/storage/fss/outbound_connector.tf @@ -12,6 +12,14 @@ resource "oci_file_storage_outbound_connector" "my_ldap_outbound_connector" { hostname = var.ldap_outbound_connector_endpoints_hostname port = var.ldap_outbound_connector_endpoints_port } + locks { + #Required + type = var.locks_type + + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override #Optional #defined_tags = map(oci_identity_tag_namespace.tag-namespace1.name.oci_identity_tag.tag1.name, var.outbound_connector_defined_tags_value) display_name = var.ldap_outbound_connector_display_name diff --git a/examples/storage/fss/snapshot.tf b/examples/storage/fss/snapshot.tf index 79f02af9d1b..386a9e8c6b2 100644 --- a/examples/storage/fss/snapshot.tf +++ b/examples/storage/fss/snapshot.tf @@ -15,5 +15,15 @@ resource "oci_file_storage_snapshot" "my_snapshot" { } # Commented out expiration_time as the date given should be a time in the future # expiration_time = "2096-01-02T15:04:05Z" + + + locks { + #Required + type = var.locks_type + + #Optional + message = var.locks_message + } + is_lock_override = var.is_lock_override } diff --git a/examples/storage/fss/variables.tf b/examples/storage/fss/variables.tf index 3515d7fcf48..c2f258b392b 100644 --- a/examples/storage/fss/variables.tf +++ b/examples/storage/fss/variables.tf @@ -303,3 +303,15 @@ variable "krb_export_export_options_is_anonymous_access_allowed" { variable "krb_export_is_idmap_groups_for_sys_auth" { default = "false" } + +variable "locks_type" { + default = "FULL" +} + +variable "locks_message" { + default = "message" +} + +variable "is_lock_override" { + default = true +} diff --git a/internal/integrationtest/file_storage_export_test.go b/internal/integrationtest/file_storage_export_test.go index a52472e7839..b769bc0ba27 100644 --- a/internal/integrationtest/file_storage_export_test.go +++ b/internal/integrationtest/file_storage_export_test.go @@ -48,6 +48,24 @@ var ( "export_options": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageExportExportOptionsRepresentation}, "is_idmap_groups_for_sys_auth": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, } + FileStorageExportRepresentationWithFullLock = map[string]interface{}{ + "export_set_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_export_set.test_export_set.id}`}, + "file_system_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system.id}`}, + "path": acctest.Representation{RepType: acctest.Required, Create: `/files-5`}, + "export_options": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageExportExportOptionsRepresentation}, + "is_idmap_groups_for_sys_auth": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageExportFullLockRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + } + FileStorageExportRepresentationWithDeleteLock = map[string]interface{}{ + "export_set_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_export_set.test_export_set.id}`}, + "file_system_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system.id}`}, + "path": acctest.Representation{RepType: acctest.Required, Create: `/files-5`}, + "export_options": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageExportExportOptionsRepresentation}, + "is_idmap_groups_for_sys_auth": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageExportDeleteLockRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + } FileStorageExportExportOptionsRepresentation = map[string]interface{}{ "source": acctest.Representation{RepType: acctest.Required, Create: `0.0.0.0/0`}, "access": acctest.Representation{RepType: acctest.Optional, Create: `READ_WRITE`, Update: `READ_ONLY`}, @@ -58,6 +76,14 @@ var ( "is_anonymous_access_allowed": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, "require_privileged_source_port": acctest.Representation{RepType: acctest.Optional, Create: `false`, Update: `true`}, } + FileStorageExportFullLockRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + FileStorageExportDeleteLockRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `DELETE`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } FileStorageExportResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_file_storage_export_set", "test_export_set", acctest.Required, acctest.Create, FileStorageExportSetRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) + @@ -106,10 +132,10 @@ func TestFileStorageExportResource_basic(t *testing.T) { { Config: config + compartmentIdVariableStr + FileStorageExportResourceDependencies, }, - // verify Create with optionals + // verify Create with optionals and DELETE lock { Config: config + compartmentIdVariableStr + FileStorageExportResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_export", "test_export", acctest.Optional, acctest.Create, FileStorageExportRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_export", "test_export", acctest.Optional, acctest.Create, FileStorageExportRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "export_options.#", "1"), resource.TestCheckResourceAttr(resourceName, "export_options.0.access", "READ_WRITE"), @@ -125,6 +151,10 @@ func TestFileStorageExportResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(resourceName, "file_system_id"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttr(resourceName, "is_idmap_groups_for_sys_auth", "false"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(resourceName, "path", "/files-5"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -192,12 +222,41 @@ func TestFileStorageExportResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(datasourceName, "exports.0.time_created"), ), }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageExportResourceDependencies, + }, + // verify Create with FULL Lock + { + Config: config + compartmentIdVariableStr + FileStorageExportResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_export", "test_export", acctest.Optional, acctest.Create, FileStorageExportRepresentationWithFullLock), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "export_set_id"), + resource.TestCheckResourceAttrSet(resourceName, "file_system_id"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_idmap_groups_for_sys_auth", "false"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "FULL"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, // verify resource import { Config: config + FileStorageExportRequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{}, + ImportStateVerifyIgnore: []string{"is_lock_override"}, ResourceName: resourceName, }, }) diff --git a/internal/integrationtest/file_storage_file_system_test.go b/internal/integrationtest/file_storage_file_system_test.go index b055818e035..b5b1e2587d7 100644 --- a/internal/integrationtest/file_storage_file_system_test.go +++ b/internal/integrationtest/file_storage_file_system_test.go @@ -40,7 +40,9 @@ var ( "parent_file_system_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_file_storage_file_system.test_file_system.id}`}, "source_snapshot_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_file_storage_snapshot.test_snapshot.id}`}, "state": acctest.Representation{RepType: acctest.Optional, Create: `ACTIVE`}, - "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: FileStorageFileSystemDataSourceFilterRepresentation}} + "filter": acctest.RepresentationGroup{RepType: acctest.Required, Group: FileStorageFileSystemDataSourceFilterRepresentation}, + } + FileStorageFileSystemDataSourceFilterRepresentation = map[string]interface{}{ "name": acctest.Representation{RepType: acctest.Required, Create: `id`}, "values": acctest.Representation{RepType: acctest.Required, Create: []string{`${oci_file_storage_file_system.test_file_system2.id}`}}, @@ -60,6 +62,44 @@ var ( "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, } + FileStorageFileSystemRepresentationWithFullLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `media-files-1`, Update: `displayName2`}, + "filesystem_snapshot_policy_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageFileSystemFullLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_kms_key.kms_key_id_for_create.id}`, Update: `${oci_kms_key.kms_key_id_for_update.id}`}, + "source_snapshot_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_file_storage_snapshot.test_snapshot.id}`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } + + FileStorageFileSystemRepresentationWithDeleteLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `media-files-1`, Update: `displayName2`}, + "filesystem_snapshot_policy_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id}`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageFileSystemDeleteLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "kms_key_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_kms_key.kms_key_id_for_create.id}`, Update: `${oci_kms_key.kms_key_id_for_update.id}`}, + "source_snapshot_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_file_storage_snapshot.test_snapshot.id}`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } + + FileStorageFileSystemFullLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + + FileStorageFileSystemDeleteLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `DELETE`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + FileStorageFileSystemResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_file_storage_file_system", "test_file_system", acctest.Required, acctest.Create, FileStorageFileSystemRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_filesystem_snapshot_policy", "test_filesystem_snapshot_policy", acctest.Required, acctest.Create, FileStorageFilesystemSnapshotPolicyRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Required, acctest.Create, FileStorageSnapshotRepresentation) + @@ -119,10 +159,10 @@ func TestFileStorageFileSystemResource_basic(t *testing.T) { { Config: config + compartmentIdVariableStr + FileStorageFileSystemResourceDependencies, }, - // verify Create with optionals + // verify Create with optionals and DELETED Lock { Config: config + compartmentIdVariableStr + FileStorageFileSystemResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_file_system", "test_file_system2", acctest.Optional, acctest.Create, FileStorageFileSystemRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_file_system", "test_file_system2", acctest.Optional, acctest.Create, FileStorageFileSystemRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "availability_domain"), resource.TestCheckResourceAttr(resourceName, "clone_attach_status", "ATTACHED"), @@ -133,6 +173,10 @@ func TestFileStorageFileSystemResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttrSet(resourceName, "metered_bytes"), resource.TestCheckResourceAttrSet(resourceName, "source_snapshot_id"), resource.TestCheckResourceAttrSet(resourceName, "state"), @@ -274,12 +318,38 @@ func TestFileStorageFileSystemResource_basic(t *testing.T) { acctest.TestCheckResourceAttributesEqual(datasourceName, "file_systems.0.time_created", "oci_file_storage_file_system.test_file_system2", "time_created"), ), }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageFileSystemResourceDependencies, + }, + // verify Create with optionals and FULL Lock + { + Config: config + compartmentIdVariableStr + FileStorageFileSystemResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_file_system", "test_file_system2", acctest.Optional, acctest.Create, FileStorageFileSystemRepresentationWithFullLock), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "FULL"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, // verify resource import { Config: config + FileStorageFileSystem2RequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"source_snapshot_id", "parent_file_system_id", "detach_clone_trigger"}, + ImportStateVerifyIgnore: []string{"source_snapshot_id", "parent_file_system_id", "detach_clone_trigger", "is_lock_override"}, ResourceName: resourceName, }, }) diff --git a/internal/integrationtest/file_storage_filesystem_snapshot_policy_test.go b/internal/integrationtest/file_storage_filesystem_snapshot_policy_test.go index 43485f7a8db..af378a9632f 100644 --- a/internal/integrationtest/file_storage_filesystem_snapshot_policy_test.go +++ b/internal/integrationtest/file_storage_filesystem_snapshot_policy_test.go @@ -58,6 +58,42 @@ var ( "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, } + FileStorageFilesystemSnapshotPolicyRepresentationWithFullLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `media-policy-1`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageFilesystemSnapshotPolicyFullLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "policy_prefix": acctest.Representation{RepType: acctest.Optional, Create: `mp1`, Update: `policyPrefix2`}, + "schedules": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageFilesystemSnapshotPolicySchedulesRepresentation}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } + + FileStorageFilesystemSnapshotPolicyRepresentationWithDeleteLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `media-policy-1`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageFilesystemSnapshotPolicyDeleteLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "policy_prefix": acctest.Representation{RepType: acctest.Optional, Create: `mp1`, Update: `policyPrefix2`}, + "schedules": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageFilesystemSnapshotPolicySchedulesRepresentation}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } + + FileStorageFilesystemSnapshotPolicyFullLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + + FileStorageFilesystemSnapshotPolicyDeleteLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `DELETE`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + FileStorageFilesystemSnapshotPolicySchedulesRepresentation = map[string]interface{}{ "period": acctest.Representation{RepType: acctest.Required, Create: `YEARLY`, Update: `WEEKLY`}, "time_zone": acctest.Representation{RepType: acctest.Required, Create: `UTC`, Update: `REGIONAL_DATA_CENTER_TIME`}, @@ -120,16 +156,20 @@ func TestFileStorageFilesystemSnapshotPolicyResource_basic(t *testing.T) { { Config: config + compartmentIdVariableStr + FileStorageFilesystemSnapshotPolicyResourceDependencies, }, - // verify Create with optionals + // verify Create with optionals and DELETE lock { Config: config + compartmentIdVariableStr + FileStorageFilesystemSnapshotPolicyResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_filesystem_snapshot_policy", "test_filesystem_snapshot_policy", acctest.Optional, acctest.Create, FileStorageFilesystemSnapshotPolicyRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_filesystem_snapshot_policy", "test_filesystem_snapshot_policy", acctest.Optional, acctest.Create, FileStorageFilesystemSnapshotPolicyRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "availability_domain"), resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "media-policy-1"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(resourceName, "policy_prefix", "mp1"), resource.TestCheckResourceAttr(resourceName, "schedules.#", "1"), resource.TestCheckResourceAttr(resourceName, "schedules.0.day_of_month", "10"), @@ -241,6 +281,8 @@ func TestFileStorageFilesystemSnapshotPolicyResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "filesystem_snapshot_policies.0.display_name", "displayName2"), resource.TestCheckResourceAttr(datasourceName, "filesystem_snapshot_policies.0.freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(datasourceName, "filesystem_snapshot_policies.0.id"), + resource.TestCheckResourceAttrSet(datasourceName, "filesystem_snapshot_policies.0.locks.0.time_created"), + resource.TestCheckResourceAttr(datasourceName, "filesystem_snapshot_policies.0.locks.0.type", "DELETE"), resource.TestCheckResourceAttr(datasourceName, "filesystem_snapshot_policies.0.policy_prefix", "policyPrefix2"), resource.TestCheckResourceAttr(datasourceName, "filesystem_snapshot_policies.0.state", "ACTIVE"), resource.TestCheckResourceAttrSet(datasourceName, "filesystem_snapshot_policies.0.time_created"), @@ -259,6 +301,10 @@ func TestFileStorageFilesystemSnapshotPolicyResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(singularDatasourceName, "policy_prefix", "policyPrefix2"), resource.TestCheckResourceAttr(singularDatasourceName, "schedules.#", "1"), resource.TestCheckResourceAttr(singularDatasourceName, "schedules.0.day_of_week", "TUESDAY"), @@ -273,12 +319,39 @@ func TestFileStorageFilesystemSnapshotPolicyResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), ), }, + + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageFileSystemResourceDependencies, + }, + // verify Create with optionals and FULL Lock + { + Config: config + compartmentIdVariableStr + FileStorageFilesystemSnapshotPolicyResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_filesystem_snapshot_policy", "test_filesystem_snapshot_policy", acctest.Optional, acctest.Create, FileStorageFilesystemSnapshotPolicyRepresentationWithFullLock), + // FileStorageFileSystemRepresentation), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "FULL"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, // verify resource import { Config: config + FileStorageFilesystemSnapshotPolicyRequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{}, + ImportStateVerifyIgnore: []string{"is_lock_override"}, ResourceName: resourceName, }, }) diff --git a/internal/integrationtest/file_storage_mount_target_test.go b/internal/integrationtest/file_storage_mount_target_test.go index 1d23f6f23cb..3368e5a760e 100644 --- a/internal/integrationtest/file_storage_mount_target_test.go +++ b/internal/integrationtest/file_storage_mount_target_test.go @@ -43,7 +43,6 @@ var ( } FileStorageMountTargetRepresentation = map[string]interface{}{ - "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, @@ -58,6 +57,40 @@ var ( "nsg_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group.id}`}, Update: []string{}}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, } + FileStorageMountTargetRepresentationWithFullLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `mount-target-5`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "hostname_label": acctest.Representation{RepType: acctest.Optional, Create: `hostnamelabel`}, + "idmap_type": acctest.Representation{RepType: acctest.Optional, Create: `LDAP`, Update: `LDAP`}, + "ip_address": acctest.Representation{RepType: acctest.Optional, Create: `10.0.0.5`}, + "kerberos": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageMountTargetKerberosRepresentation}, + "ldap_idmap": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageMountTargetLdapIdmapRepresentation}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageMountTargetFullLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "nsg_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group.id}`}, Update: []string{}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } + FileStorageMountTargetRepresentationWithDeleteLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "subnet_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_subnet.test_subnet.id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `mount-target-5`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "hostname_label": acctest.Representation{RepType: acctest.Optional, Create: `hostnamelabel`}, + "idmap_type": acctest.Representation{RepType: acctest.Optional, Create: `LDAP`, Update: `LDAP`}, + "ip_address": acctest.Representation{RepType: acctest.Optional, Create: `10.0.0.5`}, + "kerberos": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageMountTargetKerberosRepresentation}, + "ldap_idmap": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageMountTargetLdapIdmapRepresentation}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageMountTargetDeleteLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "nsg_ids": acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group.id}`}, Update: []string{}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } FileStorageHPMTMountTargetRepresentation = map[string]interface{}{ "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, @@ -86,6 +119,14 @@ var ( "outbound_connector2id": acctest.Representation{RepType: acctest.Optional, Update: `${oci_file_storage_outbound_connector.test_outbound_connector2.id}`}, "schema_type": acctest.Representation{RepType: acctest.Optional, Create: `RFC2307`}, } + FileStorageMountTargetFullLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + FileStorageMountTargetDeleteLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `DELETE`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } FileStorageMountTargetResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_core_network_security_group", "test_network_security_group", acctest.Required, acctest.Create, CoreNetworkSecurityGroupRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(CoreSubnetRepresentation, map[string]interface{}{ @@ -367,12 +408,52 @@ func TestFileStorageMountTargetResource_basic(t *testing.T) { }, ), }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageMountTargetResourceDependencies + FileStorageMountTargetResourceKerberosDependencies, + }, + // Vertify create with FULL lock + { + Config: config + compartmentIdVariableStr + FileStorageMountTargetResourceDependencies + FileStorageMountTargetResourceKerberosDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_mount_target", "test_mount_target", acctest.Optional, acctest.Create, FileStorageMountTargetRepresentationWithFullLock), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "FULL"), + + func(s *terraform.State) (err error) { + _, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageMountTargetResourceDependencies + FileStorageMountTargetResourceKerberosDependencies, + }, + // Vertify create with DELETE lock + { + Config: config + compartmentIdVariableStr + FileStorageMountTargetResourceDependencies + FileStorageMountTargetResourceKerberosDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_mount_target", "test_mount_target", acctest.Optional, acctest.Create, FileStorageMountTargetRepresentationWithDeleteLock), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), + + func(s *terraform.State) (err error) { + _, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, // verify resource import { Config: config + FileStorageMountTargetRequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{}, + ImportStateVerifyIgnore: []string{"is_lock_override"}, ResourceName: resourceName, }, }) diff --git a/internal/integrationtest/file_storage_outbound_connector_test.go b/internal/integrationtest/file_storage_outbound_connector_test.go index cb89fe0cb98..2b81409986a 100644 --- a/internal/integrationtest/file_storage_outbound_connector_test.go +++ b/internal/integrationtest/file_storage_outbound_connector_test.go @@ -60,10 +60,48 @@ var ( "password_secret_version": acctest.Representation{RepType: acctest.Required, Create: `1`}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsChangesRep}, } + FileStorageOutboundConnectorRepresentationWithFullLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "bind_distinguished_name": acctest.Representation{RepType: acctest.Required, Create: `bindDistinguishedName`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "connector_type": acctest.Representation{RepType: acctest.Required, Create: `LDAPBIND`}, + "endpoints": acctest.RepresentationGroup{RepType: acctest.Required, Group: FileStorageOutboundConnectorEndpointsRepresentation}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `outbound-connector-4`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageOutboundConnectoFullLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "password_secret_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_vault_secret.test_obc_pwd_secret.id}`}, + "password_secret_version": acctest.Representation{RepType: acctest.Required, Create: `1`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsChangesRep}, + } + FileStorageOutboundConnectorRepresentationWithDeleteLock = map[string]interface{}{ + "availability_domain": acctest.Representation{RepType: acctest.Required, Create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`}, + "bind_distinguished_name": acctest.Representation{RepType: acctest.Required, Create: `bindDistinguishedName`}, + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "connector_type": acctest.Representation{RepType: acctest.Required, Create: `LDAPBIND`}, + "endpoints": acctest.RepresentationGroup{RepType: acctest.Required, Group: FileStorageOutboundConnectorEndpointsRepresentation}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `outbound-connector-4`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageOutboundConnectorDeleteLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "password_secret_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_vault_secret.test_obc_pwd_secret.id}`}, + "password_secret_version": acctest.Representation{RepType: acctest.Required, Create: `1`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsChangesRep}, + } FileStorageOutboundConnectorEndpointsRepresentation = map[string]interface{}{ "hostname": acctest.Representation{RepType: acctest.Required, Create: `hostname`}, "port": acctest.Representation{RepType: acctest.Required, Create: `10`}, } + FileStorageOutboundConnectoFullLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + FileStorageOutboundConnectorDeleteLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `DELETE`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } FileStorageOutboundConnectorResourceDependencies = AvailabilityDomainConfig + DefinedTagsDependencies + acctest.GenerateResourceFromRepresentationMap("oci_kms_vault", "test_vault", acctest.Required, acctest.Create, acctest.RepresentationCopyWithNewProperties(KmsVaultRepresentation, map[string]interface{}{ @@ -134,7 +172,7 @@ func TestFileStorageOutboundConnectorResource_basic(t *testing.T) { // verify Create with optionals { Config: config + compartmentIdVariableStr + FileStorageOutboundConnectorResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_outbound_connector", "test_outbound_connector", acctest.Optional, acctest.Create, FileStorageOutboundConnectorRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_outbound_connector", "test_outbound_connector", acctest.Optional, acctest.Create, FileStorageOutboundConnectorRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttrSet(resourceName, "availability_domain"), resource.TestCheckResourceAttr(resourceName, "bind_distinguished_name", "bindDistinguishedName"), @@ -146,6 +184,10 @@ func TestFileStorageOutboundConnectorResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "endpoints.0.port", "10"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttrSet(resourceName, "password_secret_id"), resource.TestCheckResourceAttr(resourceName, "password_secret_version", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), @@ -181,6 +223,10 @@ func TestFileStorageOutboundConnectorResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "endpoints.0.port", "10"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttrSet(resourceName, "password_secret_id"), resource.TestCheckResourceAttr(resourceName, "password_secret_version", "1"), resource.TestCheckResourceAttrSet(resourceName, "state"), @@ -248,6 +294,10 @@ func TestFileStorageOutboundConnectorResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "outbound_connectors.0.endpoints.0.port", "10"), resource.TestCheckResourceAttr(datasourceName, "outbound_connectors.0.freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(datasourceName, "outbound_connectors.0.id"), + resource.TestCheckResourceAttr(datasourceName, "outbound_connectors.0.locks.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "outbound_connectors.0.locks.0.message", "message"), + resource.TestCheckResourceAttrSet(datasourceName, "outbound_connectors.0.locks.0.time_created"), + resource.TestCheckResourceAttr(datasourceName, "outbound_connectors.0.locks.0.type", "DELETE"), resource.TestCheckResourceAttrSet(datasourceName, "outbound_connectors.0.state"), resource.TestCheckResourceAttrSet(datasourceName, "outbound_connectors.0.time_created"), ), @@ -270,17 +320,42 @@ func TestFileStorageOutboundConnectorResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "endpoints.0.port", "10"), resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(singularDatasourceName, "password_secret_version", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), ), }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageOutboundConnectorResourceDependencies, + }, + // verify Create with FULL lock + { + Config: config + compartmentIdVariableStr + FileStorageOutboundConnectorResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_outbound_connector", "test_outbound_connector", acctest.Optional, acctest.Create, FileStorageOutboundConnectorRepresentationWithFullLock), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "FULL"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + return err + }, + ), + }, // verify resource import { Config: config + FileStorageOutboundConnectorRequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{}, + ImportStateVerifyIgnore: []string{"is_lock_override"}, ResourceName: resourceName, }, }) diff --git a/internal/integrationtest/file_storage_replication_test.go b/internal/integrationtest/file_storage_replication_test.go index 7c0eea16766..df514328315 100644 --- a/internal/integrationtest/file_storage_replication_test.go +++ b/internal/integrationtest/file_storage_replication_test.go @@ -57,6 +57,42 @@ var ( "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, } + FileStorageReplicationRepresentationWithFullLock = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "source_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system_source.id}`}, + "target_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system_target.id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `replication-policy-1`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageReplicationFullLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "replication_interval": acctest.Representation{RepType: acctest.Optional, Create: `15`, Update: `16`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } + + FileStorageReplicationRepresentationWithDeleteLock = map[string]interface{}{ + "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id}`}, + "source_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system_source.id}`}, + "target_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system_target.id}`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "display_name": acctest.Representation{RepType: acctest.Optional, Create: `replication-policy-1`, Update: `displayName2`}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageReplicationDeleteLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + "replication_interval": acctest.Representation{RepType: acctest.Optional, Create: `15`, Update: `16`}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + } + + FileStorageReplicationFullLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + + FileStorageReplicationDeleteLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `DELETE`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + FileStorageReplicationResourceDependencies = acctest.GenerateResourceFromRepresentationMap("oci_file_storage_file_system", "test_file_system_source", acctest.Required, acctest.Create, FileStorageFileSystemRepresentation) + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_file_system", "test_file_system_target", acctest.Required, acctest.Create, FileStorageFileSystemRepresentation) + AvailabilityDomainConfig + @@ -112,12 +148,16 @@ func TestFileStorageReplicationResource_basic(t *testing.T) { // verify Create with optionals { Config: config + compartmentIdVariableStr + FileStorageReplicationResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_replication", "test_replication", acctest.Optional, acctest.Create, FileStorageReplicationRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_replication", "test_replication", acctest.Optional, acctest.Create, FileStorageReplicationRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttr(resourceName, "display_name", "replication-policy-1"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(resourceName, "replication_interval", "15"), resource.TestCheckResourceAttrSet(resourceName, "replication_target_id"), resource.TestCheckResourceAttrSet(resourceName, "source_id"), @@ -141,7 +181,7 @@ func TestFileStorageReplicationResource_basic(t *testing.T) { { Config: config + compartmentIdVariableStr + compartmentIdUVariableStr + FileStorageReplicationResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_replication", "test_replication", acctest.Optional, acctest.Create, - acctest.RepresentationCopyWithNewProperties(FileStorageReplicationRepresentation, map[string]interface{}{ + acctest.RepresentationCopyWithNewProperties(FileStorageReplicationRepresentationWithDeleteLock, map[string]interface{}{ "compartment_id": acctest.Representation{RepType: acctest.Required, Create: `${var.compartment_id_for_update}`}, })), Check: acctest.ComposeAggregateTestCheckFuncWrapper( @@ -149,6 +189,10 @@ func TestFileStorageReplicationResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "display_name", "replication-policy-1"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(resourceName, "replication_interval", "15"), resource.TestCheckResourceAttrSet(resourceName, "replication_target_id"), resource.TestCheckResourceAttrSet(resourceName, "source_id"), @@ -175,6 +219,10 @@ func TestFileStorageReplicationResource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(resourceName, "replication_interval", "16"), resource.TestCheckResourceAttrSet(resourceName, "replication_target_id"), resource.TestCheckResourceAttrSet(resourceName, "source_id"), @@ -211,6 +259,10 @@ func TestFileStorageReplicationResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "replications.0.display_name", "displayName2"), resource.TestCheckResourceAttr(datasourceName, "replications.0.freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(datasourceName, "replications.0.id"), + resource.TestCheckResourceAttr(datasourceName, "replications.0.locks.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "replications.0.locks.0.message", "message"), + resource.TestCheckResourceAttrSet(datasourceName, "replications.0.locks.0.time_created"), + resource.TestCheckResourceAttr(datasourceName, "replications.0.locks.0.type", "DELETE"), resource.TestCheckResourceAttrSet(datasourceName, "replications.0.recovery_point_time"), resource.TestCheckResourceAttr(datasourceName, "replications.0.replication_interval", "16"), resource.TestCheckResourceAttrSet(datasourceName, "replications.0.state"), @@ -244,12 +296,38 @@ func TestFileStorageReplicationResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularDatasourceName, "target_id"), ), }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageReplicationResourceDependencies, + }, + // verify Create with optionals and FULL lock + { + Config: config + compartmentIdVariableStr + FileStorageReplicationResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_replication", "test_replication", acctest.Optional, acctest.Create, FileStorageReplicationRepresentationWithFullLock), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "FULL"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, // verify resource import { Config: config + FileStorageReplicationRequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{}, + ImportStateVerifyIgnore: []string{"is_lock_override"}, ResourceName: resourceName, }, }) diff --git a/internal/integrationtest/file_storage_snapshot_test.go b/internal/integrationtest/file_storage_snapshot_test.go index 2bcae3b3417..4ec5c979627 100644 --- a/internal/integrationtest/file_storage_snapshot_test.go +++ b/internal/integrationtest/file_storage_snapshot_test.go @@ -55,6 +55,39 @@ var ( "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, } + + FileStorageSnapshotRepresentationWithFullLock = map[string]interface{}{ + "file_system_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system.id}`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `snapshot-1`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "expiration_time": acctest.Representation{RepType: acctest.Optional, Create: ExpirationTimeCreate, Update: ExpirationTimeUpdate}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageSnapshotFullLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + } + + FileStorageSnapshotRepresentationWithDeleteLock = map[string]interface{}{ + "file_system_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_file_storage_file_system.test_file_system.id}`}, + "name": acctest.Representation{RepType: acctest.Required, Create: `snapshot-1`}, + "defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`}, + "expiration_time": acctest.Representation{RepType: acctest.Optional, Create: ExpirationTimeCreate, Update: ExpirationTimeUpdate}, + "freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}}, + "lifecycle": acctest.RepresentationGroup{RepType: acctest.Required, Group: ignoreDefinedTagsDifferencesRepresentation}, + "locks": acctest.RepresentationGroup{RepType: acctest.Optional, Group: FileStorageSnapshotDeleteLocksRepresentation}, + "is_lock_override": acctest.Representation{RepType: acctest.Required, Create: `true`, Update: `true`}, + } + + FileStorageSnapshotFullLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `FULL`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + + FileStorageSnapshotDeleteLocksRepresentation = map[string]interface{}{ + "type": acctest.Representation{RepType: acctest.Required, Create: `DELETE`}, + "message": acctest.Representation{RepType: acctest.Optional, Create: `message`}, + } + ExpirationTimeCreate = time.Now().Add(10 * time.Hour).Format(TimeFormat) ExpirationTimeUpdate = time.Now().Add(11 * time.Hour).Format(TimeFormat) @@ -103,15 +136,19 @@ func TestFileStorageSnapshotResource_basic(t *testing.T) { { Config: config + compartmentIdVariableStr + FileStorageSnapshotResourceDependencies, }, - // verify Create with optionals + // verify Create with optionals and UPDATE Lock { Config: config + compartmentIdVariableStr + FileStorageSnapshotResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Optional, acctest.Create, FileStorageSnapshotRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Optional, acctest.Create, FileStorageSnapshotRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "expiration_time", ExpirationTimeCreate), resource.TestCheckResourceAttrSet(resourceName, "file_system_id"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(resourceName, "name", "snapshot-1"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -128,15 +165,19 @@ func TestFileStorageSnapshotResource_basic(t *testing.T) { ), }, - // verify updates to updatable parameters + // verify updates to updatable parameters with DELETE lock { Config: config + compartmentIdVariableStr + FileStorageSnapshotResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Optional, acctest.Update, FileStorageSnapshotRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Optional, acctest.Update, FileStorageSnapshotRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(resourceName, "expiration_time", ExpirationTimeUpdate), resource.TestCheckResourceAttrSet(resourceName, "file_system_id"), resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(resourceName, "name", "snapshot-1"), resource.TestCheckResourceAttrSet(resourceName, "state"), resource.TestCheckResourceAttrSet(resourceName, "time_created"), @@ -155,7 +196,7 @@ func TestFileStorageSnapshotResource_basic(t *testing.T) { Config: config + acctest.GenerateDataSourceFromRepresentationMap("oci_file_storage_snapshots", "test_snapshots", acctest.Optional, acctest.Update, FileStorageFileStorageSnapshotDataSourceRepresentation) + compartmentIdVariableStr + FileStorageSnapshotResourceDependencies + - acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Optional, acctest.Update, FileStorageSnapshotRepresentation), + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Optional, acctest.Update, FileStorageSnapshotRepresentationWithDeleteLock), Check: acctest.ComposeAggregateTestCheckFuncWrapper( resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), resource.TestCheckResourceAttrSet(datasourceName, "file_system_id"), @@ -168,6 +209,10 @@ func TestFileStorageSnapshotResource_basic(t *testing.T) { resource.TestCheckResourceAttr(datasourceName, "snapshots.0.freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(datasourceName, "snapshots.0.id"), resource.TestCheckResourceAttrSet(datasourceName, "snapshots.0.is_clone_source"), + resource.TestCheckResourceAttr(datasourceName, "snapshots.0.locks.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "snapshots.0.locks.0.message", "message"), + resource.TestCheckResourceAttrSet(datasourceName, "snapshots.0.locks.0.time_created"), + resource.TestCheckResourceAttr(datasourceName, "snapshots.0.locks.0.type", "DELETE"), resource.TestCheckResourceAttr(datasourceName, "snapshots.0.name", "snapshot-1"), resource.TestCheckResourceAttrSet(datasourceName, "snapshots.0.provenance_id"), resource.TestCheckResourceAttrSet(datasourceName, "snapshots.0.snapshot_time"), @@ -188,6 +233,10 @@ func TestFileStorageSnapshotResource_basic(t *testing.T) { resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "is_clone_source"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(singularDatasourceName, "locks.0.type", "DELETE"), resource.TestCheckResourceAttr(singularDatasourceName, "name", "snapshot-1"), resource.TestCheckResourceAttrSet(singularDatasourceName, "provenance_id"), resource.TestCheckResourceAttrSet(singularDatasourceName, "snapshot_time"), @@ -196,12 +245,38 @@ func TestFileStorageSnapshotResource_basic(t *testing.T) { resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), ), }, + // delete before next Create + { + Config: config + compartmentIdVariableStr + FileStorageSnapshotResourceDependencies, + }, + + // Verify Full lock + { + Config: config + compartmentIdVariableStr + FileStorageSnapshotResourceDependencies + + acctest.GenerateResourceFromRepresentationMap("oci_file_storage_snapshot", "test_snapshot", acctest.Optional, acctest.Create, FileStorageSnapshotRepresentationWithFullLock), + Check: acctest.ComposeAggregateTestCheckFuncWrapper( + resource.TestCheckResourceAttr(resourceName, "locks.#", "1"), + resource.TestCheckResourceAttr(resourceName, "locks.0.message", "message"), + resource.TestCheckResourceAttrSet(resourceName, "locks.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "locks.0.type", "FULL"), + + func(s *terraform.State) (err error) { + resId, err = acctest.FromInstanceState(s, resourceName, "id") + if isEnableExportCompartment, _ := strconv.ParseBool(utils.GetEnvSettingWithDefault("enable_export_compartment", "true")); isEnableExportCompartment { + if errExport := resourcediscovery.TestExportCompartmentWithResourceName(&resId, &compartmentId, resourceName); errExport != nil { + return errExport + } + } + return err + }, + ), + }, // verify resource import { Config: config + FileStorageSnapshotRequiredOnlyResource, ImportState: true, ImportStateVerify: true, - ImportStateVerifyIgnore: []string{}, + ImportStateVerifyIgnore: []string{"is_lock_override"}, ResourceName: resourceName, }, }) diff --git a/internal/service/file_storage/file_storage_export_resource.go b/internal/service/file_storage/file_storage_export_resource.go index 810a6cfe78f..d6cfc08ed66 100644 --- a/internal/service/file_storage/file_storage_export_resource.go +++ b/internal/service/file_storage/file_storage_export_resource.go @@ -7,12 +7,14 @@ import ( "context" "fmt" "strconv" + "time" "github.com/oracle/terraform-provider-oci/internal/client" "github.com/oracle/terraform-provider-oci/internal/tfresource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_common "github.com/oracle/oci-go-sdk/v65/common" oci_file_storage "github.com/oracle/oci-go-sdk/v65/filestorage" ) @@ -110,7 +112,50 @@ func FileStorageExportResource() *schema.Resource { Optional: true, Computed: true, }, + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "related_resource_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "time_created": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: tfresource.TimeDiffSuppressFunction, + }, + + // Computed + }, + }, + }, + "is_lock_override": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, // Computed "state": { Type: schema.TypeString, @@ -227,6 +272,23 @@ func (s *FileStorageExportResourceCrud) Create() error { request.IsIdmapGroupsForSysAuth = &tmp } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_file_storage.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + request.Locks = tmp + } + } + if path, ok := s.D.GetOkExists("path"); ok { tmp := path.(string) request.Path = &tmp @@ -292,6 +354,11 @@ func (s *FileStorageExportResourceCrud) Update() error { request.IsIdmapGroupsForSysAuth = &tmp } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") response, err := s.Client.UpdateExport(context.Background(), request) @@ -309,6 +376,11 @@ func (s *FileStorageExportResourceCrud) Delete() error { tmp := s.D.Id() request.ExportId = &tmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") _, err := s.Client.DeleteExport(context.Background(), request) @@ -334,6 +406,12 @@ func (s *FileStorageExportResourceCrud) SetData() error { s.D.Set("is_idmap_groups_for_sys_auth", *s.Res.IsIdmapGroupsForSysAuth) } + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.Path != nil { s.D.Set("path", *s.Res.Path) } @@ -439,3 +517,31 @@ func ClientOptionsToMap(obj oci_file_storage.ClientOptions) map[string]interface return result } + +func (s *FileStorageExportResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_file_storage.ResourceLock, error) { + result := oci_file_storage.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_file_storage.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} diff --git a/internal/service/file_storage/file_storage_exports_data_source.go b/internal/service/file_storage/file_storage_exports_data_source.go index 7db9e74ccc5..951e975d030 100644 --- a/internal/service/file_storage/file_storage_exports_data_source.go +++ b/internal/service/file_storage/file_storage_exports_data_source.go @@ -142,6 +142,12 @@ func (s *FileStorageExportsDataSourceCrud) SetData() error { export["is_idmap_groups_for_sys_auth"] = *r.IsIdmapGroupsForSysAuth } + locks := []interface{}{} + for _, item := range r.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + export["locks"] = locks + if r.Path != nil { export["path"] = *r.Path } diff --git a/internal/service/file_storage/file_storage_file_system_resource.go b/internal/service/file_storage/file_storage_file_system_resource.go index b1628fc71a2..10dbe0701f7 100644 --- a/internal/service/file_storage/file_storage_file_system_resource.go +++ b/internal/service/file_storage/file_storage_file_system_resource.go @@ -7,12 +7,14 @@ import ( "context" "fmt" "strconv" + "time" "github.com/oracle/terraform-provider-oci/internal/client" "github.com/oracle/terraform-provider-oci/internal/tfresource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_common "github.com/oracle/oci-go-sdk/v65/common" oci_file_storage "github.com/oracle/oci-go-sdk/v65/filestorage" ) @@ -75,6 +77,50 @@ func FileStorageFileSystemResource() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "related_resource_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "time_created": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: tfresource.TimeDiffSuppressFunction, + }, + + // Computed + }, + }, + }, + "is_lock_override": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "source_snapshot_id": { Type: schema.TypeString, Optional: true, @@ -291,6 +337,23 @@ func (s *FileStorageFileSystemResourceCrud) Create() error { request.KmsKeyId = &tmp } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_file_storage.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + request.Locks = tmp + } + } + if sourceSnapshotId, ok := s.D.GetOkExists("source_snapshot_id"); ok { tmp := sourceSnapshotId.(string) request.SourceSnapshotId = &tmp @@ -365,6 +428,11 @@ func (s *FileStorageFileSystemResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + if kmsKeyId, ok := s.D.GetOkExists("kms_key_id"); ok { tmp := kmsKeyId.(string) request.KmsKeyId = &tmp @@ -392,6 +460,11 @@ func (s *FileStorageFileSystemResourceCrud) Delete() error { tmp := s.D.Id() request.FileSystemId = &tmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") _, err := s.Client.DeleteFileSystem(context.Background(), request) @@ -447,6 +520,12 @@ func (s *FileStorageFileSystemResourceCrud) SetData() error { s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) } + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.MeteredBytes != nil { s.D.Set("metered_bytes", strconv.FormatInt(*s.Res.MeteredBytes, 10)) } @@ -493,6 +572,54 @@ func (s *FileStorageFileSystemResourceCrud) DetachClone() error { return nil } +func (s *FileStorageFileSystemResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_file_storage.ResourceLock, error) { + result := oci_file_storage.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_file_storage.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} + +func ResourceLockToMap(obj oci_file_storage.ResourceLock) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Message != nil { + result["message"] = string(*obj.Message) + } + + if obj.RelatedResourceId != nil { + result["related_resource_id"] = string(*obj.RelatedResourceId) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.Format(time.RFC3339Nano) + } + + result["type"] = string(obj.Type) + + return result +} + func FileSystemSourceDetailsToMap(obj *oci_file_storage.SourceDetails) map[string]interface{} { result := map[string]interface{}{} @@ -516,6 +643,11 @@ func (s *FileStorageFileSystemResourceCrud) updateCompartment(compartment interf idTmp := s.D.Id() changeCompartmentRequest.FileSystemId = &idTmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + changeCompartmentRequest.IsLockOverride = &tmp + } + changeCompartmentRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") _, err := s.Client.ChangeFileSystemCompartment(context.Background(), changeCompartmentRequest) diff --git a/internal/service/file_storage/file_storage_file_systems_data_source.go b/internal/service/file_storage/file_storage_file_systems_data_source.go index 943f9b3dad7..10b8f863629 100644 --- a/internal/service/file_storage/file_storage_file_systems_data_source.go +++ b/internal/service/file_storage/file_storage_file_systems_data_source.go @@ -189,6 +189,12 @@ func (s *FileStorageFileSystemsDataSourceCrud) SetData() error { fileSystem["lifecycle_details"] = *r.LifecycleDetails } + locks := []interface{}{} + for _, item := range r.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + fileSystem["locks"] = locks + if r.MeteredBytes != nil { fileSystem["metered_bytes"] = strconv.FormatInt(*r.MeteredBytes, 10) } diff --git a/internal/service/file_storage/file_storage_filesystem_snapshot_policies_data_source.go b/internal/service/file_storage/file_storage_filesystem_snapshot_policies_data_source.go index dda6b55418b..2cf8d88a4fa 100644 --- a/internal/service/file_storage/file_storage_filesystem_snapshot_policies_data_source.go +++ b/internal/service/file_storage/file_storage_filesystem_snapshot_policies_data_source.go @@ -143,6 +143,12 @@ func (s *FileStorageFilesystemSnapshotPoliciesDataSourceCrud) SetData() error { filesystemSnapshotPolicy["id"] = *r.Id } + locks := []interface{}{} + for _, item := range r.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + filesystemSnapshotPolicy["locks"] = locks + if r.PolicyPrefix != nil { filesystemSnapshotPolicy["policy_prefix"] = *r.PolicyPrefix } diff --git a/internal/service/file_storage/file_storage_filesystem_snapshot_policy_data_source.go b/internal/service/file_storage/file_storage_filesystem_snapshot_policy_data_source.go index e308e677039..59d7110d212 100644 --- a/internal/service/file_storage/file_storage_filesystem_snapshot_policy_data_source.go +++ b/internal/service/file_storage/file_storage_filesystem_snapshot_policy_data_source.go @@ -84,6 +84,12 @@ func (s *FileStorageFilesystemSnapshotPolicyDataSourceCrud) SetData() error { s.D.Set("freeform_tags", s.Res.FreeformTags) + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.PolicyPrefix != nil { s.D.Set("policy_prefix", *s.Res.PolicyPrefix) } diff --git a/internal/service/file_storage/file_storage_filesystem_snapshot_policy_resource.go b/internal/service/file_storage/file_storage_filesystem_snapshot_policy_resource.go index 94807528846..f03569b9528 100644 --- a/internal/service/file_storage/file_storage_filesystem_snapshot_policy_resource.go +++ b/internal/service/file_storage/file_storage_filesystem_snapshot_policy_resource.go @@ -62,6 +62,50 @@ func FileStorageFilesystemSnapshotPolicyResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "related_resource_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "time_created": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: tfresource.TimeDiffSuppressFunction, + }, + + // Computed + }, + }, + }, + "is_lock_override": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "policy_prefix": { Type: schema.TypeString, Optional: true, @@ -290,6 +334,23 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) Create() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_file_storage.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + request.Locks = tmp + } + } + if policyPrefix, ok := s.D.GetOkExists("policy_prefix"); ok { tmp := policyPrefix.(string) request.PolicyPrefix = &tmp @@ -372,6 +433,11 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + if policyPrefix, ok := s.D.GetOkExists("policy_prefix"); ok { tmp := policyPrefix.(string) request.PolicyPrefix = &tmp @@ -411,6 +477,11 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) Delete() error { tmp := s.D.Id() request.FilesystemSnapshotPolicyId = &tmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") _, err := s.Client.DeleteFilesystemSnapshotPolicy(context.Background(), request) @@ -436,6 +507,12 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) SetData() error { s.D.Set("freeform_tags", s.Res.FreeformTags) + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.PolicyPrefix != nil { s.D.Set("policy_prefix", *s.Res.PolicyPrefix) } @@ -461,6 +538,11 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) StartFilesystemSnapsho idTmp := s.D.Id() request.FilesystemSnapshotPolicyId = &idTmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") _, err := s.Client.UnpauseFilesystemSnapshotPolicy(context.Background(), request) @@ -480,6 +562,11 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) StopFilesystemSnapshot idTmp := s.D.Id() request.FilesystemSnapshotPolicyId = &idTmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + request.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") _, err := s.Client.PauseFilesystemSnapshotPolicy(context.Background(), request) @@ -493,6 +580,34 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) StopFilesystemSnapshot return tfresource.WaitForResourceCondition(s, retentionPolicyFunc, s.D.Timeout(schema.TimeoutUpdate)) } +func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_file_storage.ResourceLock, error) { + result := oci_file_storage.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_file_storage.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} + func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) mapToSnapshotSchedule(fieldKeyFormat string) (oci_file_storage.SnapshotSchedule, error) { result := oci_file_storage.SnapshotSchedule{} @@ -598,6 +713,11 @@ func (s *FileStorageFilesystemSnapshotPolicyResourceCrud) updateCompartment(comp idTmp := s.D.Id() changeCompartmentRequest.FilesystemSnapshotPolicyId = &idTmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + changeCompartmentRequest.IsLockOverride = &tmp + } + changeCompartmentRequest.RequestMetadata.RetryPolicy = tfresource.GetRetryPolicy(s.DisableNotFoundRetries, "file_storage") _, err := s.Client.ChangeFilesystemSnapshotPolicyCompartment(context.Background(), changeCompartmentRequest) diff --git a/internal/service/file_storage/file_storage_mount_target_resource.go b/internal/service/file_storage/file_storage_mount_target_resource.go index 6e759dd5632..472c45eafdd 100644 --- a/internal/service/file_storage/file_storage_mount_target_resource.go +++ b/internal/service/file_storage/file_storage_mount_target_resource.go @@ -7,8 +7,12 @@ import ( "context" "fmt" "strconv" + "time" + "strings" + oci_common "github.com/oracle/oci-go-sdk/v65/common" + "github.com/oracle/terraform-provider-oci/internal/client" "github.com/oracle/terraform-provider-oci/internal/tfresource" @@ -83,6 +87,11 @@ func FileStorageMountTargetResource() *schema.Resource { Computed: true, ForceNew: true, }, + "is_lock_override": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "kerberos": { Type: schema.TypeList, Optional: true, @@ -174,6 +183,45 @@ func FileStorageMountTargetResource() *schema.Resource { }, }, }, + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "related_resource_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "time_created": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: tfresource.TimeDiffSuppressFunction, + }, + + // Computed + }, + }, + }, "nsg_ids": { Type: schema.TypeSet, Optional: true, @@ -350,6 +398,11 @@ func (s *FileStorageMountTargetResourceCrud) Create() error { request.IpAddress = &tmp } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + if kerberos, ok := s.D.GetOkExists("kerberos"); ok { if tmpList := kerberos.([]interface{}); len(tmpList) > 0 { fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "kerberos", 0) @@ -372,6 +425,23 @@ func (s *FileStorageMountTargetResourceCrud) Create() error { } } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_file_storage.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + request.Locks = tmp + } + } + if nsgIds, ok := s.D.GetOkExists("nsg_ids"); ok { set := nsgIds.(*schema.Set) interfaces := set.List() @@ -500,6 +570,11 @@ func (s *FileStorageMountTargetResourceCrud) Update() error { request.IdmapType = oci_file_storage.MountTargetIdmapTypeEnum(idmapType.(string)) } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + if kerberos, ok := s.D.GetOkExists("kerberos"); ok { if tmpList := kerberos.([]interface{}); len(tmpList) > 0 { fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "kerberos", 0) @@ -553,6 +628,11 @@ func (s *FileStorageMountTargetResourceCrud) Update() error { func (s *FileStorageMountTargetResourceCrud) Delete() error { request := oci_file_storage.DeleteMountTargetRequest{} + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + tmp := s.D.Id() request.MountTargetId = &tmp @@ -603,6 +683,12 @@ func (s *FileStorageMountTargetResourceCrud) SetData() error { s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) } + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, MountTargetResourceLockToMap(item)) + } + s.D.Set("locks", locks) + nsgIds := []interface{}{} for _, item := range s.Res.NsgIds { nsgIds = append(nsgIds, item) @@ -940,12 +1026,65 @@ func LdapIdmapToMap(obj *oci_file_storage.LdapIdmap) map[string]interface{} { return result } +func (s *FileStorageMountTargetResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_file_storage.ResourceLock, error) { + result := oci_file_storage.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_file_storage.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} + +func MountTargetResourceLockToMap(obj oci_file_storage.ResourceLock) map[string]interface{} { + result := map[string]interface{}{} + + if obj.Message != nil { + result["message"] = string(*obj.Message) + } + + if obj.RelatedResourceId != nil { + result["related_resource_id"] = string(*obj.RelatedResourceId) + } + + if obj.TimeCreated != nil { + result["time_created"] = obj.TimeCreated.Format(time.RFC3339Nano) + } + + result["type"] = string(obj.Type) + + return result +} + func (s *FileStorageMountTargetResourceCrud) updateCompartment(compartment interface{}) error { changeCompartmentRequest := oci_file_storage.ChangeMountTargetCompartmentRequest{} compartmentTmp := compartment.(string) changeCompartmentRequest.CompartmentId = &compartmentTmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + changeCompartmentRequest.IsLockOverride = &tmp + } + idTmp := s.D.Id() changeCompartmentRequest.MountTargetId = &idTmp diff --git a/internal/service/file_storage/file_storage_mount_targets_data_source.go b/internal/service/file_storage/file_storage_mount_targets_data_source.go index 7011e553a3e..e3a754aba12 100644 --- a/internal/service/file_storage/file_storage_mount_targets_data_source.go +++ b/internal/service/file_storage/file_storage_mount_targets_data_source.go @@ -157,6 +157,12 @@ func (s *FileStorageMountTargetsDataSourceCrud) SetData() error { mountTarget["id"] = *r.Id } + locks := []interface{}{} + for _, item := range r.Locks { + locks = append(locks, MountTargetResourceLockToMap(item)) + } + mountTarget["locks"] = locks + mountTarget["nsg_ids"] = r.NsgIds if r.ObservedThroughput != nil { diff --git a/internal/service/file_storage/file_storage_outbound_connector_data_source.go b/internal/service/file_storage/file_storage_outbound_connector_data_source.go index 63d60eda6b2..27480bb57c7 100644 --- a/internal/service/file_storage/file_storage_outbound_connector_data_source.go +++ b/internal/service/file_storage/file_storage_outbound_connector_data_source.go @@ -106,6 +106,12 @@ func (s *FileStorageOutboundConnectorDataSourceCrud) SetData() error { s.D.Set("freeform_tags", v.FreeformTags) + locks := []interface{}{} + for _, item := range v.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + s.D.Set("state", v.LifecycleState) if v.TimeCreated != nil { diff --git a/internal/service/file_storage/file_storage_outbound_connector_resource.go b/internal/service/file_storage/file_storage_outbound_connector_resource.go index 4454c5ef9f5..bd254e465d9 100644 --- a/internal/service/file_storage/file_storage_outbound_connector_resource.go +++ b/internal/service/file_storage/file_storage_outbound_connector_resource.go @@ -9,10 +9,12 @@ import ( "log" "strconv" "strings" + "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" + oci_common "github.com/oracle/oci-go-sdk/v65/common" oci_file_storage "github.com/oracle/oci-go-sdk/v65/filestorage" "github.com/oracle/terraform-provider-oci/internal/client" @@ -101,6 +103,50 @@ func FileStorageOutboundConnectorResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "related_resource_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "time_created": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: tfresource.TimeDiffSuppressFunction, + }, + + // Computed + }, + }, + }, + "is_lock_override": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "password_secret_id": { Type: schema.TypeString, Optional: true, @@ -260,6 +306,11 @@ func (s *FileStorageOutboundConnectorResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + tmp := s.D.Id() request.OutboundConnectorId = &tmp @@ -277,6 +328,11 @@ func (s *FileStorageOutboundConnectorResourceCrud) Update() error { func (s *FileStorageOutboundConnectorResourceCrud) Delete() error { request := oci_file_storage.DeleteOutboundConnectorRequest{} + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + tmp := s.D.Id() request.OutboundConnectorId = &tmp @@ -327,6 +383,12 @@ func (s *FileStorageOutboundConnectorResourceCrud) SetData() error { s.D.Set("freeform_tags", v.FreeformTags) + locks := []interface{}{} + for _, item := range v.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + s.D.Set("state", v.LifecycleState) if v.TimeCreated != nil { @@ -373,6 +435,34 @@ func EndpointToMap(obj oci_file_storage.Endpoint) map[string]interface{} { return result } +func (s *FileStorageOutboundConnectorResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_file_storage.ResourceLock, error) { + result := oci_file_storage.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_file_storage.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} + func (s *FileStorageOutboundConnectorResourceCrud) populateTopLevelPolymorphicCreateOutboundConnectorRequest(request *oci_file_storage.CreateOutboundConnectorRequest) error { //discriminator connectorTypeRaw, ok := s.D.GetOkExists("connector_type") @@ -435,6 +525,22 @@ func (s *FileStorageOutboundConnectorResourceCrud) populateTopLevelPolymorphicCr if freeformTags, ok := s.D.GetOkExists("freeform_tags"); ok { details.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_file_storage.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + details.Locks = tmp + } + } request.CreateOutboundConnectorDetails = details default: return fmt.Errorf("unknown connector_type '%v' was specified", connectorType) @@ -448,6 +554,11 @@ func (s *FileStorageOutboundConnectorResourceCrud) updateCompartment(compartment compartmentTmp := compartment.(string) changeCompartmentRequest.CompartmentId = &compartmentTmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + changeCompartmentRequest.IsLockOverride = &tmp + } + idTmp := s.D.Id() changeCompartmentRequest.OutboundConnectorId = &idTmp diff --git a/internal/service/file_storage/file_storage_outbound_connectors_data_source.go b/internal/service/file_storage/file_storage_outbound_connectors_data_source.go index 94e38df3bde..6db661acd0d 100644 --- a/internal/service/file_storage/file_storage_outbound_connectors_data_source.go +++ b/internal/service/file_storage/file_storage_outbound_connectors_data_source.go @@ -162,6 +162,12 @@ func (s *FileStorageOutboundConnectorsDataSourceCrud) SetData() error { result["id"] = string(*v.Id) } + locks := []interface{}{} + for _, item := range v.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + result["locks"] = locks + result["state"] = string(v.LifecycleState) if v.TimeCreated != nil { diff --git a/internal/service/file_storage/file_storage_replication_data_source.go b/internal/service/file_storage/file_storage_replication_data_source.go index 959eaaf8a9f..d2edf28e219 100644 --- a/internal/service/file_storage/file_storage_replication_data_source.go +++ b/internal/service/file_storage/file_storage_replication_data_source.go @@ -99,6 +99,12 @@ func (s *FileStorageReplicationDataSourceCrud) SetData() error { s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) } + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.RecoveryPointTime != nil { s.D.Set("recovery_point_time", s.Res.RecoveryPointTime.String()) } diff --git a/internal/service/file_storage/file_storage_replication_resource.go b/internal/service/file_storage/file_storage_replication_resource.go index 01a1abe4e23..86938eff85e 100644 --- a/internal/service/file_storage/file_storage_replication_resource.go +++ b/internal/service/file_storage/file_storage_replication_resource.go @@ -7,9 +7,11 @@ import ( "context" "fmt" "strconv" + "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + oci_common "github.com/oracle/oci-go-sdk/v65/common" oci_file_storage "github.com/oracle/oci-go-sdk/v65/filestorage" "github.com/oracle/terraform-provider-oci/internal/client" @@ -62,6 +64,50 @@ func FileStorageReplicationResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "related_resource_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "time_created": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: tfresource.TimeDiffSuppressFunction, + }, + + // Computed + }, + }, + }, + "is_lock_override": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, "replication_interval": { Type: schema.TypeString, Optional: true, @@ -204,6 +250,23 @@ func (s *FileStorageReplicationResourceCrud) Create() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_file_storage.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + request.Locks = tmp + } + } + if replicationInterval, ok := s.D.GetOkExists("replication_interval"); ok { tmp := replicationInterval.(string) tmpInt64, err := strconv.ParseInt(tmp, 10, 64) @@ -280,6 +343,11 @@ func (s *FileStorageReplicationResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + tmp := s.D.Id() request.ReplicationId = &tmp @@ -310,6 +378,11 @@ func (s *FileStorageReplicationResourceCrud) Delete() error { request.DeleteMode = oci_file_storage.DeleteReplicationDeleteModeEnum(deleteMode.(string)) } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + tmp := s.D.Id() request.ReplicationId = &tmp @@ -352,6 +425,12 @@ func (s *FileStorageReplicationResourceCrud) SetData() error { s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) } + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.RecoveryPointTime != nil { s.D.Set("recovery_point_time", s.Res.RecoveryPointTime.String()) } @@ -381,12 +460,45 @@ func (s *FileStorageReplicationResourceCrud) SetData() error { return nil } +func (s *FileStorageReplicationResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_file_storage.ResourceLock, error) { + result := oci_file_storage.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_file_storage.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} + func (s *FileStorageReplicationResourceCrud) updateCompartment(compartment interface{}) error { changeCompartmentRequest := oci_file_storage.ChangeReplicationCompartmentRequest{} compartmentTmp := compartment.(string) changeCompartmentRequest.CompartmentId = &compartmentTmp + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + changeCompartmentRequest.IsLockOverride = &tmp + } + idTmp := s.D.Id() changeCompartmentRequest.ReplicationId = &idTmp diff --git a/internal/service/file_storage/file_storage_replications_data_source.go b/internal/service/file_storage/file_storage_replications_data_source.go index f2863bc9e0c..5582abbbdcb 100644 --- a/internal/service/file_storage/file_storage_replications_data_source.go +++ b/internal/service/file_storage/file_storage_replications_data_source.go @@ -157,6 +157,12 @@ func (s *FileStorageReplicationsDataSourceCrud) SetData() error { replication["lifecycle_details"] = *r.LifecycleDetails } + locks := []interface{}{} + for _, item := range r.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + replication["locks"] = locks + if r.RecoveryPointTime != nil { replication["recovery_point_time"] = r.RecoveryPointTime.String() } diff --git a/internal/service/file_storage/file_storage_snapshot_data_source.go b/internal/service/file_storage/file_storage_snapshot_data_source.go index 58e57fcb948..18fbda81976 100644 --- a/internal/service/file_storage/file_storage_snapshot_data_source.go +++ b/internal/service/file_storage/file_storage_snapshot_data_source.go @@ -93,6 +93,12 @@ func (s *FileStorageSnapshotDataSourceCrud) SetData() error { s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) } + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.Name != nil { s.D.Set("name", *s.Res.Name) } diff --git a/internal/service/file_storage/file_storage_snapshot_resource.go b/internal/service/file_storage/file_storage_snapshot_resource.go index 76265b857dc..d6c6d8be271 100644 --- a/internal/service/file_storage/file_storage_snapshot_resource.go +++ b/internal/service/file_storage/file_storage_snapshot_resource.go @@ -5,6 +5,7 @@ package file_storage import ( "context" + "fmt" "time" "github.com/oracle/terraform-provider-oci/internal/client" @@ -59,7 +60,50 @@ func FileStorageSnapshotResource() *schema.Resource { Computed: true, Elem: schema.TypeString, }, - + "locks": { + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + // Required + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + // Optional + "message": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "related_resource_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "time_created": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + DiffSuppressFunc: tfresource.TimeDiffSuppressFunction, + }, + + // Computed + }, + }, + }, + "is_lock_override": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, // Computed "filesystem_snapshot_policy_id": { Type: schema.TypeString, @@ -193,6 +237,23 @@ func (s *FileStorageSnapshotResourceCrud) Create() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if locks, ok := s.D.GetOkExists("locks"); ok { + interfaces := locks.([]interface{}) + tmp := make([]oci_file_storage.ResourceLock, len(interfaces)) + for i := range interfaces { + stateDataIndex := i + fieldKeyFormat := fmt.Sprintf("%s.%d.%%s", "locks", stateDataIndex) + converted, err := s.mapToResourceLock(fieldKeyFormat) + if err != nil { + return err + } + tmp[i] = converted + } + if len(tmp) != 0 || s.D.HasChange("locks") { + request.Locks = tmp + } + } + if name, ok := s.D.GetOkExists("name"); ok { tmp := name.(string) request.Name = &tmp @@ -253,6 +314,11 @@ func (s *FileStorageSnapshotResourceCrud) Update() error { request.FreeformTags = tfresource.ObjectMapToStringMap(freeformTags.(map[string]interface{})) } + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + tmp := s.D.Id() request.SnapshotId = &tmp @@ -270,6 +336,11 @@ func (s *FileStorageSnapshotResourceCrud) Update() error { func (s *FileStorageSnapshotResourceCrud) Delete() error { request := oci_file_storage.DeleteSnapshotRequest{} + if isLockOverride, ok := s.D.GetOkExists("is_lock_override"); ok { + tmp := isLockOverride.(bool) + request.IsLockOverride = &tmp + } + tmp := s.D.Id() request.SnapshotId = &tmp @@ -306,6 +377,12 @@ func (s *FileStorageSnapshotResourceCrud) SetData() error { s.D.Set("lifecycle_details", *s.Res.LifecycleDetails) } + locks := []interface{}{} + for _, item := range s.Res.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + s.D.Set("locks", locks) + if s.Res.Name != nil { s.D.Set("name", *s.Res.Name) } @@ -328,3 +405,31 @@ func (s *FileStorageSnapshotResourceCrud) SetData() error { return nil } + +func (s *FileStorageSnapshotResourceCrud) mapToResourceLock(fieldKeyFormat string) (oci_file_storage.ResourceLock, error) { + result := oci_file_storage.ResourceLock{} + + if message, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "message")); ok { + tmp := message.(string) + result.Message = &tmp + } + + if relatedResourceId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "related_resource_id")); ok { + tmp := relatedResourceId.(string) + result.RelatedResourceId = &tmp + } + + if timeCreated, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "time_created")); ok { + tmp, err := time.Parse(time.RFC3339, timeCreated.(string)) + if err != nil { + return result, err + } + result.TimeCreated = &oci_common.SDKTime{Time: tmp} + } + + if type_, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "type")); ok { + result.Type = oci_file_storage.ResourceLockTypeEnum(type_.(string)) + } + + return result, nil +} diff --git a/internal/service/file_storage/file_storage_snapshots_data_source.go b/internal/service/file_storage/file_storage_snapshots_data_source.go index 32388709697..d7ab68d710a 100644 --- a/internal/service/file_storage/file_storage_snapshots_data_source.go +++ b/internal/service/file_storage/file_storage_snapshots_data_source.go @@ -153,6 +153,12 @@ func (s *FileStorageSnapshotsDataSourceCrud) SetData() error { snapshot["lifecycle_details"] = *r.LifecycleDetails } + locks := []interface{}{} + for _, item := range r.Locks { + locks = append(locks, ResourceLockToMap(item)) + } + snapshot["locks"] = locks + if r.Name != nil { snapshot["name"] = *r.Name } diff --git a/website/docs/d/file_storage_exports.html.markdown b/website/docs/d/file_storage_exports.html.markdown index 413a11af635..a7f461de551 100644 --- a/website/docs/d/file_storage_exports.html.markdown +++ b/website/docs/d/file_storage_exports.html.markdown @@ -73,6 +73,11 @@ The following attributes are exported: * `file_system_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this export's file system. * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this export. * `is_idmap_groups_for_sys_auth` - Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `path` - Path used to access the associated file system. Avoid entering confidential information. diff --git a/website/docs/d/file_storage_file_systems.html.markdown b/website/docs/d/file_storage_file_systems.html.markdown index 1cfae8be862..8b485a06b36 100644 --- a/website/docs/d/file_storage_file_systems.html.markdown +++ b/website/docs/d/file_storage_file_systems.html.markdown @@ -70,6 +70,11 @@ The following attributes are exported: * `is_targetable` - Specifies whether the file system can be used as a target file system for replication. The system sets this value to `true` if the file system is unexported, hasn't yet been specified as a target file system in any replication resource, and has no user snapshots. After the file system has been specified as a target in a replication, or if the file system contains user snapshots, the system sets this value to `false`. For more information, see [Using Replication](https://docs.cloud.oracle.com/iaas/Content/File/Tasks/using-replication.htm). * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key used to encrypt the encryption keys associated with this file system. * `lifecycle_details` - Additional information about the current 'lifecycleState'. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `metered_bytes` - The number of bytes consumed by the file system, including any snapshots. This number reflects the metered size of the file system and is updated asynchronously with respect to updates to the file system. For more information, see [File System Usage and Metering](https://docs.cloud.oracle.com/iaas/Content/File/Concepts/FSutilization.htm). * `replication_target_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the replication target associated with the file system. Empty if the file system is not being used as target in a replication. * `source_details` - Source information for the file system. diff --git a/website/docs/d/file_storage_filesystem_snapshot_policies.html.markdown b/website/docs/d/file_storage_filesystem_snapshot_policies.html.markdown index 378381cdbac..07303160af2 100644 --- a/website/docs/d/file_storage_filesystem_snapshot_policies.html.markdown +++ b/website/docs/d/file_storage_filesystem_snapshot_policies.html.markdown @@ -55,6 +55,11 @@ The following attributes are exported: * `display_name` - A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: `My Filesystem Snapshot Policy` * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `policy_prefix` - The prefix to apply to all snapshots created by this policy. Example: `acme` * `schedules` - The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy. * `day_of_month` - The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules. If not set, the system chooses a value at creation time. diff --git a/website/docs/d/file_storage_filesystem_snapshot_policy.html.markdown b/website/docs/d/file_storage_filesystem_snapshot_policy.html.markdown index ba86e4b80a6..a59a63a3099 100644 --- a/website/docs/d/file_storage_filesystem_snapshot_policy.html.markdown +++ b/website/docs/d/file_storage_filesystem_snapshot_policy.html.markdown @@ -38,6 +38,11 @@ The following attributes are exported: * `display_name` - A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: `My Filesystem Snapshot Policy` * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `policy_prefix` - The prefix to apply to all snapshots created by this policy. Example: `acme` * `schedules` - The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy. * `day_of_month` - The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules. If not set, the system chooses a value at creation time. diff --git a/website/docs/d/file_storage_mount_targets.html.markdown b/website/docs/d/file_storage_mount_targets.html.markdown index 3d4888d7d8c..e89807c0b89 100644 --- a/website/docs/d/file_storage_mount_targets.html.markdown +++ b/website/docs/d/file_storage_mount_targets.html.markdown @@ -75,6 +75,11 @@ The following attributes are exported: * `schema_type` - Schema type of the LDAP account. * `user_search_base` - All LDAP searches are recursive starting at this user. Example: `CN=User,DC=domain,DC=com` * `lifecycle_details` - Additional information about the current 'lifecycleState'. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `nsg_ids` - A list of Network Security Group [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). * `observed_throughput` - Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). * `private_ip_ids` - The OCIDs of the private IP addresses associated with this mount target. diff --git a/website/docs/d/file_storage_outbound_connector.html.markdown b/website/docs/d/file_storage_outbound_connector.html.markdown index 81c6b2b8355..a5e710eaebf 100644 --- a/website/docs/d/file_storage_outbound_connector.html.markdown +++ b/website/docs/d/file_storage_outbound_connector.html.markdown @@ -43,6 +43,11 @@ The following attributes are exported: * `port` - Port of the DNS server. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the outbound connector. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `password_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the password for the LDAP bind account in the Vault. * `password_secret_version` - Version of the password secret in the Vault to use. * `state` - The current state of this outbound connector. diff --git a/website/docs/d/file_storage_outbound_connectors.html.markdown b/website/docs/d/file_storage_outbound_connectors.html.markdown index 25db7d75630..f8bece325a5 100644 --- a/website/docs/d/file_storage_outbound_connectors.html.markdown +++ b/website/docs/d/file_storage_outbound_connectors.html.markdown @@ -60,6 +60,11 @@ The following attributes are exported: * `port` - Port of the DNS server. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the outbound connector. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `password_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the password for the LDAP bind account in the Vault. * `password_secret_version` - Version of the password secret in the Vault to use. * `state` - The current state of this outbound connector. diff --git a/website/docs/d/file_storage_replication.html.markdown b/website/docs/d/file_storage_replication.html.markdown index c06146552cb..d4fde486ac6 100644 --- a/website/docs/d/file_storage_replication.html.markdown +++ b/website/docs/d/file_storage_replication.html.markdown @@ -42,6 +42,11 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the replication. * `last_snapshot_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the last snapshot that has been replicated completely. Empty if the copy of the initial snapshot is not complete. * `lifecycle_details` - Additional information about the current 'lifecycleState'. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `recovery_point_time` - The [`snapshotTime`](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Snapshot/snapshotTime) of the most recent recoverable replication snapshot in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Example: `2021-04-04T20:01:29.100Z` * `replication_interval` - Duration in minutes between replication snapshots. * `replication_target_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the [`ReplicationTarget`](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/ReplicationTarget). diff --git a/website/docs/d/file_storage_replications.html.markdown b/website/docs/d/file_storage_replications.html.markdown index 8aa669bf83a..4c34224ef70 100644 --- a/website/docs/d/file_storage_replications.html.markdown +++ b/website/docs/d/file_storage_replications.html.markdown @@ -61,6 +61,11 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the replication. * `last_snapshot_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the last snapshot that has been replicated completely. Empty if the copy of the initial snapshot is not complete. * `lifecycle_details` - Additional information about the current 'lifecycleState'. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `recovery_point_time` - The [`snapshotTime`](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Snapshot/snapshotTime) of the most recent recoverable replication snapshot in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Example: `2021-04-04T20:01:29.100Z` * `replication_interval` - Duration in minutes between replication snapshots. * `replication_target_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the [`ReplicationTarget`](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/ReplicationTarget). diff --git a/website/docs/d/file_storage_snapshot.html.markdown b/website/docs/d/file_storage_snapshot.html.markdown index 609642b6790..44bcec2c6c6 100644 --- a/website/docs/d/file_storage_snapshot.html.markdown +++ b/website/docs/d/file_storage_snapshot.html.markdown @@ -40,6 +40,11 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the snapshot. * `is_clone_source` - Specifies whether the snapshot has been cloned. See [Cloning a File System](https://docs.cloud.oracle.com/iaas/Content/File/Tasks/cloningFS.htm). * `lifecycle_details` - Additional information about the current `lifecycleState`. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `name` - Name of the snapshot. This value is immutable. Avoid entering confidential information. diff --git a/website/docs/d/file_storage_snapshots.html.markdown b/website/docs/d/file_storage_snapshots.html.markdown index 6a81af9d4a2..2e63c1bfd0d 100644 --- a/website/docs/d/file_storage_snapshots.html.markdown +++ b/website/docs/d/file_storage_snapshots.html.markdown @@ -62,6 +62,11 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the snapshot. * `is_clone_source` - Specifies whether the snapshot has been cloned. See [Cloning a File System](https://docs.cloud.oracle.com/iaas/Content/File/Tasks/cloningFS.htm). * `lifecycle_details` - Additional information about the current `lifecycleState`. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `name` - Name of the snapshot. This value is immutable. Avoid entering confidential information. diff --git a/website/docs/r/file_storage_export.html.markdown b/website/docs/r/file_storage_export.html.markdown index efb35f4d8e5..806abe2a455 100644 --- a/website/docs/r/file_storage_export.html.markdown +++ b/website/docs/r/file_storage_export.html.markdown @@ -38,6 +38,15 @@ resource "oci_file_storage_export" "test_export" { require_privileged_source_port = var.export_export_options_require_privileged_source_port } is_idmap_groups_for_sys_auth = var.export_is_idmap_groups_for_sys_auth + locks { + #Required + type = var.export_locks_type + + #Optional + message = var.export_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.export_locks_time_created + } } ``` @@ -69,6 +78,11 @@ The following arguments are supported: * `export_set_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this export's export set. * `file_system_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this export's file system. * `is_idmap_groups_for_sys_auth` - (Optional) (Updatable) Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. * `path` - (Required) Path used to access the associated file system. Avoid entering confidential information. @@ -106,6 +120,11 @@ The following attributes are exported: * `file_system_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this export's file system. * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of this export. * `is_idmap_groups_for_sys_auth` - Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `path` - Path used to access the associated file system. Avoid entering confidential information. diff --git a/website/docs/r/file_storage_file_system.html.markdown b/website/docs/r/file_storage_file_system.html.markdown index 19bf274622b..c98748708d7 100644 --- a/website/docs/r/file_storage_file_system.html.markdown +++ b/website/docs/r/file_storage_file_system.html.markdown @@ -56,6 +56,15 @@ resource "oci_file_storage_file_system" "test_file_system" { filesystem_snapshot_policy_id = oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id freeform_tags = {"Department"= "Finance"} kms_key_id = oci_kms_key.test_key.id + locks { + #Required + type = var.file_system_locks_type + + #Optional + message = var.file_system_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.file_system_locks_time_created + } source_snapshot_id = oci_file_storage_snapshot.test_snapshot.id } ``` @@ -74,6 +83,11 @@ The following arguments are supported: May be unset as a blank value. * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `kms_key_id` - (Optional) (Updatable) The OCID of KMS key used to encrypt the encryption keys associated with this file system. May be unset as a blank or deleted from the configuration to remove the KMS key. +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. * `source_snapshot_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the snapshot used to create a cloned file system. See [Cloning a File System](https://docs.cloud.oracle.com/iaas/Content/File/Tasks/cloningFS.htm). * `detach_clone_trigger` - (Optional) (Updatable) An optional property when incremented triggers Detach Clone. Could be set to any integer value. @@ -99,6 +113,11 @@ The following attributes are exported: * `is_targetable` - Specifies whether the file system can be used as a target file system for replication. The system sets this value to `true` if the file system is unexported, hasn't yet been specified as a target file system in any replication resource, and has no user snapshots. After the file system has been specified as a target in a replication, or if the file system contains user snapshots, the system sets this value to `false`. For more information, see [Using Replication](https://docs.cloud.oracle.com/iaas/Content/File/Tasks/using-replication.htm). * `kms_key_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the KMS key used to encrypt the encryption keys associated with this file system. * `lifecycle_details` - Additional information about the current 'lifecycleState'. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `metered_bytes` - The number of bytes consumed by the file system, including any snapshots. This number reflects the metered size of the file system and is updated asynchronously with respect to updates to the file system. For more information, see [File System Usage and Metering](https://docs.cloud.oracle.com/iaas/Content/File/Concepts/FSutilization.htm). * `replication_target_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the replication target associated with the file system. Empty if the file system is not being used as target in a replication. * `source_details` - Source information for the file system. diff --git a/website/docs/r/file_storage_filesystem_snapshot_policy.html.markdown b/website/docs/r/file_storage_filesystem_snapshot_policy.html.markdown index 36d51787128..429ca2ba946 100644 --- a/website/docs/r/file_storage_filesystem_snapshot_policy.html.markdown +++ b/website/docs/r/file_storage_filesystem_snapshot_policy.html.markdown @@ -29,6 +29,15 @@ resource "oci_file_storage_filesystem_snapshot_policy" "test_filesystem_snapshot defined_tags = {"Operations.CostCenter"= "42"} display_name = var.filesystem_snapshot_policy_display_name freeform_tags = {"Department"= "Finance"} + locks { + #Required + type = var.filesystem_snapshot_policy_locks_type + + #Optional + message = var.filesystem_snapshot_policy_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.filesystem_snapshot_policy_locks_time_created + } policy_prefix = var.filesystem_snapshot_policy_policy_prefix schedules { #Required @@ -56,6 +65,11 @@ The following arguments are supported: * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` * `display_name` - (Optional) (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: `policy1` * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. * `policy_prefix` - (Optional) (Updatable) The prefix to apply to all snapshots created by this policy. Example: `acme` * `schedules` - (Optional) (Updatable) The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy. @@ -85,6 +99,11 @@ The following attributes are exported: * `display_name` - A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example: `My Filesystem Snapshot Policy` * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `policy_prefix` - The prefix to apply to all snapshots created by this policy. Example: `acme` * `schedules` - The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy. * `day_of_month` - The day of the month to create a scheduled snapshot. If the day does not exist for the month, snapshot creation will be skipped. Used for MONTHLY and YEARLY snapshot schedules. If not set, the system chooses a value at creation time. diff --git a/website/docs/r/file_storage_mount_target.html.markdown b/website/docs/r/file_storage_mount_target.html.markdown index 09355f07dcc..1951980a356 100644 --- a/website/docs/r/file_storage_mount_target.html.markdown +++ b/website/docs/r/file_storage_mount_target.html.markdown @@ -60,6 +60,7 @@ resource "oci_file_storage_mount_target" "test_mount_target" { hostname_label = var.mount_target_hostname_label idmap_type = var.mount_target_idmap_type ip_address = var.mount_target_ip_address + is_lock_override = var.mount_target_is_lock_override kerberos { #Required kerberos_realm = var.mount_target_kerberos_kerberos_realm @@ -82,6 +83,15 @@ resource "oci_file_storage_mount_target" "test_mount_target" { schema_type = var.mount_target_ldap_idmap_schema_type user_search_base = var.mount_target_ldap_idmap_user_search_base } + locks { + #Required + type = var.mount_target_locks_type + + #Optional + message = var.mount_target_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.mount_target_locks_time_created + } nsg_ids = var.mount_target_nsg_ids requested_throughput = var.mount_target_requested_throughput } @@ -105,6 +115,7 @@ The following arguments are supported: Example: `files-1` * `idmap_type` - (Optional) (Updatable) The method used to map a Unix UID to secondary groups, if any. * `ip_address` - (Optional) A private IP address of your choice. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. Example: `10.0.3.3` +* `is_lock_override` - (Optional) (Updatable) Whether to override locks (if any exist). * `kerberos` - (Optional) (Updatable) Kerberos details needed to create configuration. * `backup_key_tab_secret_version` - (Optional) (Updatable) Version of the keytab Secret in the Vault to use as a backup. * `current_key_tab_secret_version` - (Optional) (Updatable) Version of the keytab Secret in the Vault to use. @@ -120,6 +131,11 @@ The following arguments are supported: * `outbound_connector2id` - (Optional) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the second connector to use to communicate with the LDAP server. * `schema_type` - (Optional) (Updatable) Schema type of the LDAP account. * `user_search_base` - (Optional) (Updatable) All LDAP searches are recursive starting at this user. Example: `CN=User,DC=domain,DC=com` +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. * `nsg_ids` - (Optional) (Updatable) A list of Network Security Group [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). * `requested_throughput` - (Optional) (Updatable) Throughput for mount target in Gbps. Currently only 1 Gbps of requestedThroughput is supported during create MountTarget. Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). * `subnet_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the subnet in which to create the mount target. @@ -156,6 +172,11 @@ The following attributes are exported: * `schema_type` - Schema type of the LDAP account. * `user_search_base` - All LDAP searches are recursive starting at this user. Example: `CN=User,DC=domain,DC=com` * `lifecycle_details` - Additional information about the current 'lifecycleState'. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `nsg_ids` - A list of Network Security Group [OCIDs](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see [Security Rules](https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/securityrules.htm). * `observed_throughput` - Current billed throughput for mount target in Gbps. This corresponds to shape of mount target. Available shapes and corresponding throughput are listed at [Mount Target Performance](https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). * `private_ip_ids` - The OCIDs of the private IP addresses associated with this mount target. diff --git a/website/docs/r/file_storage_outbound_connector.html.markdown b/website/docs/r/file_storage_outbound_connector.html.markdown index a6554d0eba7..08a232421d9 100644 --- a/website/docs/r/file_storage_outbound_connector.html.markdown +++ b/website/docs/r/file_storage_outbound_connector.html.markdown @@ -51,6 +51,15 @@ resource "oci_file_storage_outbound_connector" "test_outbound_connector" { defined_tags = {"Operations.CostCenter"= "42"} display_name = var.outbound_connector_display_name freeform_tags = {"Department"= "Finance"} + locks { + #Required + type = var.outbound_connector_locks_type + + #Optional + message = var.outbound_connector_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.outbound_connector_locks_time_created + } password_secret_id = oci_vault_secret.test_secret.id password_secret_version = var.outbound_connector_password_secret_version } @@ -70,6 +79,11 @@ The following arguments are supported: * `hostname` - (Required) Name of the DNS server. * `port` - (Required) Port of the DNS server. * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. * `password_secret_id` - (Optional) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the password for the LDAP bind account in the Vault. * `password_secret_version` - (Optional) Version of the password secret in the Vault to use. @@ -92,6 +106,11 @@ The following attributes are exported: * `port` - Port of the DNS server. * `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the outbound connector. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `password_secret_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the password for the LDAP bind account in the Vault. * `password_secret_version` - Version of the password secret in the Vault to use. * `state` - The current state of this outbound connector. diff --git a/website/docs/r/file_storage_replication.html.markdown b/website/docs/r/file_storage_replication.html.markdown index 6d247e692c9..7c3479ff871 100644 --- a/website/docs/r/file_storage_replication.html.markdown +++ b/website/docs/r/file_storage_replication.html.markdown @@ -52,6 +52,15 @@ resource "oci_file_storage_replication" "test_replication" { defined_tags = {"Operations.CostCenter"= "42"} display_name = var.replication_display_name freeform_tags = {"Department"= "Finance"} + locks { + #Required + type = var.replication_locks_type + + #Optional + message = var.replication_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.replication_locks_time_created + } replication_interval = var.replication_replication_interval } ``` @@ -64,6 +73,11 @@ The following arguments are supported: * `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` * `display_name` - (Optional) (Updatable) A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. An associated replication target will also created with the same `displayName`. Example: `My replication` * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. * `replication_interval` - (Optional) (Updatable) Duration in minutes between replication snapshots. * `source_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the source file system. * `target_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the target file system. @@ -86,6 +100,11 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the replication. * `last_snapshot_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the last snapshot that has been replicated completely. Empty if the copy of the initial snapshot is not complete. * `lifecycle_details` - Additional information about the current 'lifecycleState'. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `recovery_point_time` - The [`snapshotTime`](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/Snapshot/snapshotTime) of the most recent recoverable replication snapshot in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) timestamp format. Example: `2021-04-04T20:01:29.100Z` * `replication_interval` - Duration in minutes between replication snapshots. * `replication_target_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the [`ReplicationTarget`](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/ReplicationTarget). diff --git a/website/docs/r/file_storage_snapshot.html.markdown b/website/docs/r/file_storage_snapshot.html.markdown index aca99bd7684..b902854e3fe 100644 --- a/website/docs/r/file_storage_snapshot.html.markdown +++ b/website/docs/r/file_storage_snapshot.html.markdown @@ -26,6 +26,15 @@ resource "oci_file_storage_snapshot" "test_snapshot" { defined_tags = {"Operations.CostCenter"= "42"} expiration_time = var.snapshot_expiration_time freeform_tags = {"Department"= "Finance"} + locks { + #Required + type = var.snapshot_locks_type + + #Optional + message = var.snapshot_locks_message + related_resource_id = oci_cloud_guard_resource.test_resource.id + time_created = var.snapshot_locks_time_created + } } ``` @@ -37,6 +46,11 @@ The following arguments are supported: * `expiration_time` - (Optional) (Updatable) The time when this snapshot will be deleted. * `file_system_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the file system to take a snapshot of. * `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` +* `locks` - (Optional) Locks associated with this resource. + * `message` - (Optional) A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - (Optional) The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - (Optional) When the lock was created. + * `type` - (Required) Type of the lock. * `name` - (Required) Name of the snapshot. This value is immutable. It must also be unique with respect to all other non-DELETED snapshots on the associated file system. Avoid entering confidential information. @@ -59,6 +73,11 @@ The following attributes are exported: * `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the snapshot. * `is_clone_source` - Specifies whether the snapshot has been cloned. See [Cloning a File System](https://docs.cloud.oracle.com/iaas/Content/File/Tasks/cloningFS.htm). * `lifecycle_details` - Additional information about the current `lifecycleState`. +* `locks` - Locks associated with this resource. + * `message` - A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked. + * `related_resource_id` - The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + * `time_created` - When the lock was created. + * `type` - Type of the lock. * `name` - Name of the snapshot. This value is immutable. Avoid entering confidential information. From ecc3dfcc25d71b28d294dba19b739f181fcb2dc2 Mon Sep 17 00:00:00 2001 From: Rakshith Siddanahalli Murukannappa Date: Wed, 23 Oct 2024 14:54:13 -0700 Subject: [PATCH 10/13] Vendored - oci-go-sdk v65.77.0 changes for existing & new services --- go.mod | 2 +- go.sum | 2 - .../v65/cloudbridge/aws_asset_source.go | 192 ++ .../cloudbridge/aws_asset_source_summary.go | 171 ++ .../v65/cloudbridge/aws_ebs_asset.go | 166 ++ .../v65/cloudbridge/aws_ebs_properties.go | 69 + .../v65/cloudbridge/aws_ec2_asset.go | 174 ++ .../v65/cloudbridge/aws_ec2_properties.go | 133 + .../create_aws_asset_source_details.go | 150 ++ .../create_aws_ebs_asset_details.go | 121 + .../create_aws_ec2_asset_details.go | 129 + .../v65/cloudbridge/group_identifier.go | 42 + .../cloudbridge/instance_network_interface.go | 78 + .../instance_network_interface_association.go | 51 + .../instance_network_interface_attachment.go | 54 + .../instance_private_ip_address.go | 46 + .../v65/cloudbridge/instance_state.go | 42 + ...upported_cloud_regions_request_response.go | 241 ++ .../v65/cloudbridge/monthly_cost_summary.go | 42 + .../oci-go-sdk/v65/cloudbridge/placement.go | 60 + .../supported_cloud_region_collection.go | 39 + .../supported_cloud_region_lifecycle_state.go | 56 + .../supported_cloud_region_summary.go | 61 + .../oracle/oci-go-sdk/v65/cloudbridge/tag.go | 42 + .../update_aws_asset_source_details.go | 119 + .../update_aws_ebs_asset_details.go | 89 + .../update_aws_ec2_asset_details.go | 97 + .../v65/cloudbridge/volume_attachment.go | 51 + .../oracle/oci-go-sdk/v65/common/version.go | 2 +- .../containerengine/containerengine_client.go | 88 +- .../oci-go-sdk/v65/core/virtual_circuit.go | 2 + .../virtual_circuit_redundancy_metadata.go | 206 ++ .../v65/database/autonomous_database.go | 396 +++ ...onomous_database_encryption_key_details.go | 147 ++ ...s_database_encryption_key_history_entry.go | 68 + .../database/autonomous_database_summary.go | 396 +++ .../v65/database/aws_key_details.go | 63 + .../v65/database/azure_key_details.go | 57 + .../create_autonomous_database_base.go | 9 + ...reate_autonomous_database_clone_details.go | 190 ++ .../create_autonomous_database_details.go | 184 ++ ...autonomous_database_from_backup_details.go | 190 ++ ..._database_from_backup_timestamp_details.go | 196 ++ ..._autonomous_database_data_guard_details.go | 187 ++ ..._cross_region_disaster_recovery_details.go | 193 ++ ...cross_tenancy_disaster_recovery_details.go | 193 ++ ...hable_autonomous_database_clone_details.go | 202 ++ .../v65/database/oci_key_details.go | 57 + .../v65/database/okv_key_details.go | 66 + .../database/oracle_managed_key_details.go | 51 + .../undelete_autonomous_database_details.go | 187 ++ .../update_autonomous_database_details.go | 180 ++ .../datascience/backup_operation_details.go | 48 + .../v65/datascience/backup_setting.go | 48 + .../v65/datascience/create_model_details.go | 4 + .../v65/datascience/datascience_client.go | 63 + .../list_work_requests_request_response.go | 4 + .../oci-go-sdk/v65/datascience/model.go | 11 + .../datascience/model_setting_action_state.go | 60 + ...odel_setting_customer_notification_type.go | 64 + .../v65/datascience/model_summary.go | 3 + ...rchived_model_artifact_request_response.go | 100 + .../retention_operation_details.go | 60 + .../v65/datascience/retention_setting.go | 48 + .../v65/datascience/update_model_details.go | 4 + .../work_request_operation_type.go | 4 + .../add_export_lock_request_response.go | 105 + .../add_file_system_lock_request_response.go | 105 + ...m_snapshot_policy_lock_request_response.go | 105 + .../add_mount_target_lock_request_response.go | 105 + ...utbound_connector_lock_request_response.go | 105 + .../add_replication_lock_request_response.go | 105 + .../add_snapshot_lock_request_response.go | 105 + ...ile_system_compartment_request_response.go | 3 + ...hot_policy_compartment_request_response.go | 3 + ...unt_target_compartment_request_response.go | 3 + ..._connector_compartment_request_response.go | 3 + ...eplication_compartment_request_response.go | 3 + .../v65/filestorage/create_export_details.go | 3 + .../filestorage/create_file_system_details.go | 3 + ...eate_filesystem_snapshot_policy_details.go | 3 + .../create_ldap_bind_account_details.go | 8 + .../create_mount_target_details.go | 3 + .../create_mount_target_request_response.go | 3 + .../create_outbound_connector_details.go | 10 + .../filestorage/create_replication_details.go | 3 + .../filestorage/create_snapshot_details.go | 3 + .../delete_export_request_response.go | 3 + .../delete_file_system_request_response.go | 3 + ...system_snapshot_policy_request_response.go | 3 + .../delete_mount_target_request_response.go | 3 + ...ete_outbound_connector_request_response.go | 3 + .../delete_replication_request_response.go | 3 + ...ete_replication_target_request_response.go | 3 + .../delete_snapshot_request_response.go | 3 + .../oci-go-sdk/v65/filestorage/export.go | 3 + .../v65/filestorage/export_summary.go | 3 + .../oci-go-sdk/v65/filestorage/file_system.go | 3 + .../v65/filestorage/file_system_summary.go | 3 + .../v65/filestorage/filestorage_client.go | 2302 +++++++++++------ .../filestorage/filesystem_snapshot_policy.go | 3 + .../filesystem_snapshot_policy_summary.go | 3 + .../v65/filestorage/ldap_bind_account.go | 8 + .../filestorage/ldap_bind_account_summary.go | 8 + .../v65/filestorage/mount_target.go | 3 + .../v65/filestorage/mount_target_summary.go | 3 + .../v65/filestorage/outbound_connector.go | 10 + .../filestorage/outbound_connector_summary.go | 10 + ...system_snapshot_policy_request_response.go | 3 + .../remove_export_lock_request_response.go | 105 + ...emove_file_system_lock_request_response.go | 105 + ...m_snapshot_policy_lock_request_response.go | 105 + ...move_mount_target_lock_request_response.go | 105 + ...utbound_connector_lock_request_response.go | 105 + ...emove_replication_lock_request_response.go | 105 + .../remove_snapshot_lock_request_response.go | 105 + .../oci-go-sdk/v65/filestorage/replication.go | 3 + .../v65/filestorage/replication_summary.go | 3 + .../v65/filestorage/resource_lock.go | 97 + .../oci-go-sdk/v65/filestorage/snapshot.go | 3 + .../v65/filestorage/snapshot_summary.go | 3 + ...system_snapshot_policy_request_response.go | 3 + .../update_export_request_response.go | 3 + .../update_file_system_request_response.go | 3 + ...system_snapshot_policy_request_response.go | 3 + .../update_mount_target_request_response.go | 3 + ...ate_outbound_connector_request_response.go | 3 + .../update_replication_request_response.go | 3 + .../update_snapshot_request_response.go | 3 + .../v65/fleetappsmanagement/action_group.go | 5 +- .../action_group_based_user_action_details.go | 65 + .../action_group_details.go | 17 +- .../v65/fleetappsmanagement/action_type.go | 3 +- .../activity_resource_target.go | 9 +- .../announcement_collection.go | 5 +- .../announcement_sort_by.go | 3 +- .../announcement_summary.go | 17 +- .../api_based_execution_details.go | 5 +- .../fleetappsmanagement/artifact_details.go | 123 + .../associated_fleet_credential_details.go | 5 +- .../associated_fleet_property_details.go | 9 +- .../associated_fleet_resource_details.go | 9 +- .../associated_local_task_details.go | 18 +- .../associated_scheduler_definition.go | 7 +- .../associated_shared_task_details.go | 6 +- .../associated_task_details.go | 3 +- .../v65/fleetappsmanagement/associations.go | 11 +- .../check_resource_tagging_details.go | 9 +- ...check_resource_tagging_request_response.go | 2 +- .../compliance_detail_policy.go | 93 + .../compliance_detail_product.go | 45 + .../compliance_detail_resource.go | 51 + .../compliance_detail_target.go | 45 + .../fleetappsmanagement/compliance_level.go | 56 + .../compliance_patch_detail.go | 59 + .../fleetappsmanagement/compliance_policy.go | 137 + .../compliance_policy_collection.go | 39 + .../compliance_policy_rule.go | 229 ++ .../compliance_policy_rule_collection.go | 39 + .../compliance_policy_rule_summary.go | 170 ++ .../compliance_policy_summary.go | 78 + .../fleetappsmanagement/compliance_record.go | 122 + .../compliance_record_aggregation.go | 41 + ...ompliance_record_aggregation_collection.go | 39 + .../compliance_record_collection.go | 39 + .../compliance_record_dimension.go | 48 + .../compliance_record_summary.go | 76 + .../fleetappsmanagement/compliance_report.go | 9 +- .../compliance_report_patch_detail.go | 13 +- .../compliance_report_product.go | 7 +- .../compliance_report_resource.go | 10 +- .../compliance_report_target.go | 11 +- .../compliance_rule_severity.go | 64 + .../fleetappsmanagement/compliance_state.go | 3 +- .../component_properties.go | 55 +- .../v65/fleetappsmanagement/condition.go | 12 +- .../config_association_details.go | 44 + .../config_category_details.go | 147 ++ .../confirm_targets_details.go | 5 +- .../confirm_targets_request_response.go | 2 +- .../fleetappsmanagement/content_details.go | 5 +- .../create_compliance_policy_rule_details.go | 127 + ...compliance_policy_rule_request_response.go | 109 + .../create_fleet_credential_details.go | 3 +- ...reate_fleet_credential_request_response.go | 2 +- .../create_fleet_details.go | 30 +- .../create_fleet_property_details.go | 9 +- .../create_fleet_property_request_response.go | 2 +- .../create_fleet_resource_details.go | 5 +- .../create_fleet_resource_request_response.go | 2 +- .../create_maintenance_window_details.go | 19 +- .../create_onboarding_details.go | 9 +- .../create_onboarding_request_response.go | 2 +- .../create_patch_details.go | 128 + .../create_patch_request_response.go | 100 + .../create_platform_configuration_details.go | 84 + ...platform_configuration_request_response.go | 100 + .../create_property_details.go | 9 +- .../create_runbook_details.go | 82 + .../create_runbook_request_response.go | 109 + .../create_scheduler_definition_details.go | 3 +- .../create_task_record_details.go | 57 + .../create_task_record_request_response.go | 100 + .../credential_config_category_details.go | 52 + .../fleetappsmanagement/credential_details.go | 5 +- .../credential_entity_specific_details.go | 27 +- ...compliance_policy_rule_request_response.go | 97 + ...elete_fleet_credential_request_response.go | 2 +- .../delete_fleet_property_request_response.go | 4 +- .../delete_fleet_request_response.go | 2 +- .../delete_fleet_resource_request_response.go | 2 +- .../delete_onboarding_request_response.go | 97 + .../delete_patch_request_response.go | 97 + ...platform_configuration_request_response.go | 97 + .../delete_runbook_request_response.go | 97 + .../delete_task_record_request_response.go | 97 + .../dependent_patch_details.go | 39 + .../v65/fleetappsmanagement/details.go | 37 +- .../fleetappsmanagement/discovered_target.go | 9 +- .../enable_latest_policy_details.go | 39 + .../enable_latest_policy_request_response.go | 104 + .../entity_execution_details.go | 18 +- .../environment_config_category_details.go | 53 + .../v65/fleetappsmanagement/execution.go | 32 +- .../execution_collection.go | 5 +- .../fleetappsmanagement/execution_details.go | 5 +- .../fleetappsmanagement/execution_summary.go | 34 +- .../execution_workflow_details.go | 5 +- .../export_compliance_report_details.go | 57 + ...port_compliance_report_request_response.go | 114 + .../v65/fleetappsmanagement/fleet.go | 32 +- .../fleetappsmanagement/fleet_collection.go | 3 +- .../fleetappsmanagement/fleet_credential.go | 5 +- .../fleet_credential_collection.go | 3 +- ...leet_credential_entity_specific_details.go | 54 + .../fleet_credential_summary.go | 3 +- .../fleet_product_collection.go | 3 +- .../fleet_product_summary.go | 7 +- .../v65/fleetappsmanagement/fleet_property.go | 15 +- .../fleet_property_collection.go | 7 +- .../fleet_property_summary.go | 9 +- .../v65/fleetappsmanagement/fleet_resource.go | 22 +- .../fleet_resource_collection.go | 5 +- .../fleet_resource_summary.go | 20 +- .../v65/fleetappsmanagement/fleet_summary.go | 14 +- .../v65/fleetappsmanagement/fleet_target.go | 18 +- .../fleet_target_collection.go | 3 +- .../fleet_target_summary.go | 18 +- .../fleetappsmanagement_client.go | 65 +- ...agement_fleetappsmanagementadmin_client.go | 1166 ++++++++- ...tappsmanagementmaintenancewindow_client.go | 13 +- ...nt_fleetappsmanagementoperations_client.go | 907 ++++++- ...ment_fleetappsmanagementrunbooks_client.go | 493 +++- .../generate_compliance_report_details.go | 8 +- ...rate_compliance_report_request_response.go | 4 +- .../fleetappsmanagement/generic_artifact.go | 62 + .../generic_artifact_details.go | 52 + .../get_compliance_policy_request_response.go | 93 + ...compliance_policy_rule_request_response.go | 93 + .../get_compliance_report_request_response.go | 4 +- .../get_fleet_credential_request_response.go | 2 +- .../get_fleet_property_request_response.go | 4 +- .../get_fleet_request_response.go | 2 +- .../get_fleet_resource_request_response.go | 2 +- .../get_onboarding_request_response.go | 93 + .../get_patch_request_response.go | 93 + ...platform_configuration_request_response.go | 93 + .../v65/fleetappsmanagement/group.go | 12 +- .../v65/fleetappsmanagement/input_argument.go | 5 +- .../fleetappsmanagement/input_parameter.go | 3 +- .../inventory_resource_collection.go | 3 +- .../inventory_resource_summary.go | 9 +- .../v65/fleetappsmanagement/job_activity.go | 24 +- .../v65/fleetappsmanagement/job_status.go | 7 +- .../key_encryption_credential_details.go | 9 +- .../life_cycle_action_group_type.go | 3 +- .../list_announcements_request_response.go | 6 +- ...st_compliance_policies_request_response.go | 210 ++ ...ompliance_policy_rules_request_response.go | 216 ++ ...ist_compliance_records_request_response.go | 215 ++ ...list_fleet_credentials_request_response.go | 14 +- .../list_fleet_products_request_response.go | 4 +- .../list_fleet_properties_request_response.go | 6 +- .../list_fleet_resources_request_response.go | 8 +- .../list_fleet_targets_request_response.go | 6 +- .../list_fleets_request_response.go | 12 +- ...st_inventory_resources_request_response.go | 9 +- ...st_maintenance_windows_request_response.go | 7 +- .../list_onboardings_request_response.go | 2 +- .../list_patches_request_response.go | 233 ++ ...latform_configurations_request_response.go | 215 ++ .../list_properties_request_response.go | 6 +- .../list_resources_request_response.go | 208 ++ .../list_runbooks_request_response.go | 12 +- ..._scheduler_definitions_request_response.go | 11 +- .../list_scheduler_jobs_request_response.go | 5 +- .../list_steps_request_response.go | 208 ++ .../list_targets_request_response.go | 2 +- .../fleetappsmanagement/maintenance_window.go | 19 +- .../maintenance_window_collection.go | 5 +- .../maintenance_window_summary.go | 17 +- .../maintenance_window_type.go | 3 +- .../manage_job_execution_details.go | 62 + .../manage_job_execution_request_response.go | 107 + .../manage_settings_details.go | 39 + .../manage_settings_request_response.go | 104 + .../v65/fleetappsmanagement/managed_entity.go | 56 + .../managed_entity_aggregation.go | 41 + .../managed_entity_aggregation_collection.go | 39 + .../managed_entity_dimension.go | 42 + .../notification_preferences.go | 10 +- .../object_storage_bucket_content_details.go | 7 +- .../v65/fleetappsmanagement/onboarding.go | 19 +- .../onboarding_collection.go | 7 +- .../onboarding_policy_collection.go | 7 +- .../onboarding_policy_summary.go | 5 +- .../fleetappsmanagement/onboarding_summary.go | 18 +- .../fleetappsmanagement/operation_runbook.go | 3 +- .../fleetappsmanagement/operation_status.go | 3 +- .../v65/fleetappsmanagement/operation_type.go | 175 +- .../v65/fleetappsmanagement/os_type.go | 3 +- .../v65/fleetappsmanagement/outcome.go | 11 +- .../output_variable_details.go | 5 +- .../output_variable_input_argument.go | 7 +- .../output_variable_mapping.go | 8 +- .../v65/fleetappsmanagement/patch.go | 285 ++ .../fleetappsmanagement/patch_collection.go | 39 + .../patch_level_selection_details.go | 106 + .../patch_name_selection_details.go | 55 + .../v65/fleetappsmanagement/patch_product.go | 42 + .../patch_release_date_selection_details.go | 55 + .../patch_selection_details.go | 131 + .../v65/fleetappsmanagement/patch_severity.go | 64 + .../v65/fleetappsmanagement/patch_summary.go | 179 ++ .../v65/fleetappsmanagement/patch_type.go | 39 + .../patch_type_config_category_details.go | 52 + .../v65/fleetappsmanagement/pause_details.go | 123 + .../plain_text_credential_details.go | 5 +- .../platform_configuration.go | 249 ++ .../platform_configuration_collection.go | 39 + .../platform_configuration_summary.go | 153 ++ .../platform_specific_artifact.go | 164 ++ .../platform_specific_artifact_details.go | 54 + .../v65/fleetappsmanagement/preferences.go | 7 +- .../product_config_category_details.go | 71 + ...t_stack_as_product_sub_category_details.go | 67 + .../product_stack_config_category_details.go | 85 + ...duct_stack_generic_sub_category_details.go | 51 + .../product_stack_sub_category_details.go | 123 + .../product_version_details.go | 44 + .../v65/fleetappsmanagement/properties.go | 3 +- .../v65/fleetappsmanagement/property.go | 13 +- .../property_collection.go | 7 +- .../fleetappsmanagement/property_summary.go | 11 +- .../publish_runbook_details.go | 39 + .../publish_runbook_request_response.go | 104 + .../request_resource_validation_details.go | 9 +- ...st_resource_validation_request_response.go | 4 +- .../request_target_discovery_details.go | 9 +- ...quest_target_discovery_request_response.go | 4 +- .../resource_collection.go | 39 + ...urce_credential_entity_specific_details.go | 54 + .../fleetappsmanagement/resource_summary.go | 64 + .../resource_tag_check_details.go | 7 +- .../resource_tag_enablement_info.go | 7 +- .../rollback_workflow_details.go | 87 + .../v65/fleetappsmanagement/rule.go | 15 +- .../v65/fleetappsmanagement/runbook.go | 45 +- .../fleetappsmanagement/runbook_collection.go | 5 +- .../fleetappsmanagement/runbook_summary.go | 8 +- .../v65/fleetappsmanagement/schedule.go | 3 +- .../scheduled_fleet_collection.go | 3 +- .../scheduled_fleet_summary.go | 3 +- .../scheduler_definition.go | 19 +- .../scheduler_definition_collection.go | 3 +- .../scheduler_definition_summary.go | 3 +- .../v65/fleetappsmanagement/scheduler_job.go | 25 +- .../scheduler_job_aggregation.go | 41 + .../scheduler_job_aggregation_collection.go | 39 + .../scheduler_job_collection.go | 5 +- .../scheduler_job_dimension.go | 39 + .../scheduler_job_summary.go | 21 +- .../v65/fleetappsmanagement/scope.go | 3 +- .../script_based_execution_details.go | 20 +- .../v65/fleetappsmanagement/selection.go | 3 +- .../fleetappsmanagement/selection_criteria.go | 9 +- .../set_default_runbook_details.go | 39 + .../set_default_runbook_request_response.go | 107 + .../v65/fleetappsmanagement/sort_order.go | 3 +- .../step_based_user_action_details.go | 74 + .../fleetappsmanagement/step_collection.go | 39 + .../v65/fleetappsmanagement/step_summary.go | 67 + .../string_input_argument.go | 5 +- ...mpliance_record_counts_request_response.go | 149 ++ ..._managed_entity_counts_request_response.go | 149 ++ ...e_scheduler_job_counts_request_response.go | 149 ++ ...rget_credential_entity_specific_details.go | 9 +- .../fleetappsmanagement/target_resource.go | 5 +- .../v65/fleetappsmanagement/task.go | 3 +- .../v65/fleetappsmanagement/task_argument.go | 3 +- .../task_execution_type.go | 3 +- .../task_notification_preferences.go | 45 + .../v65/fleetappsmanagement/task_record.go | 5 +- .../task_record_collection.go | 3 +- .../task_record_summary.go | 3 +- .../v65/fleetappsmanagement/task_scope.go | 3 +- .../v65/fleetappsmanagement/task_variable.go | 6 +- .../time_based_pause_details.go | 54 + .../update_compliance_policy_rule_details.go | 106 + ...compliance_policy_rule_request_response.go | 100 + .../update_fleet_credential_details.go | 3 +- ...pdate_fleet_credential_request_response.go | 4 +- .../update_fleet_details.go | 6 +- .../update_fleet_property_details.go | 7 +- .../update_fleet_property_request_response.go | 4 +- .../update_fleet_request_response.go | 2 +- .../update_fleet_resource_details.go | 5 +- .../update_fleet_resource_request_response.go | 2 +- .../update_maintenance_window_details.go | 17 +- ...ate_maintenance_window_request_response.go | 2 +- .../update_onboarding_details.go | 42 + .../update_onboarding_request_response.go | 100 + .../update_patch_details.go | 121 + .../update_patch_request_response.go | 100 + .../update_platform_configuration_details.go | 78 + ...platform_configuration_request_response.go | 100 + .../update_property_details.go | 9 +- .../update_runbook_details.go | 79 + .../update_runbook_request_response.go | 100 + .../update_scheduler_definition_details.go | 3 +- .../update_scheduler_job_details.go | 7 +- .../update_task_record_details.go | 55 + .../update_task_record_request_response.go | 100 + .../user_action_based_pause_details.go | 51 + .../user_action_details.go | 179 ++ .../v65/fleetappsmanagement/value_type.go | 3 +- .../v65/fleetappsmanagement/variable.go | 42 + .../vault_secret_credential_details.go | 3 +- .../v65/fleetappsmanagement/work_request.go | 3 +- .../fleetappsmanagement/work_request_error.go | 3 +- .../work_request_error_collection.go | 3 +- .../work_request_log_entry.go | 3 +- .../work_request_log_entry_collection.go | 3 +- .../work_request_resource.go | 3 +- .../work_request_resource_metadata_key.go | 3 +- .../work_request_summary.go | 3 +- .../work_request_summary_collection.go | 3 +- .../fleetappsmanagement/workflow_component.go | 3 +- .../v65/fleetappsmanagement/workflow_group.go | 5 +- .../workflow_group_component.go | 7 +- .../workflow_task_component.go | 3 +- .../v65/identitydomains/auth_token.go | 11 + .../identitydomains/customer_secret_key.go | 9 + .../o_auth2_client_credential.go | 11 + .../v65/identitydomains/smtp_credential.go | 10 + .../opsi/host_configuration_metric_group.go | 8 + .../oci-go-sdk/v65/opsi/host_containers.go | 6 + .../oci-go-sdk/v65/opsi/host_io_statistics.go | 91 + .../v65/opsi/host_performance_metric_group.go | 8 - .../v65/opsi/host_resource_statistics.go | 8 + .../oci-go-sdk/v65/opsi/io_usage_trend.go | 56 + .../v65/opsi/io_usage_trend_aggregation.go | 44 + .../opsi/opsi_operationsinsights_client.go | 58 + ...insight_host_recommendation_aggregation.go | 4 + ...t_io_usage_trend_aggregation_collection.go | 50 + ...insight_io_usage_trend_request_response.go | 190 ++ ...e_capacity_trend_aggregation_collection.go | 4 + ...ght_resource_forecast_trend_aggregation.go | 4 + ...ource_statistics_aggregation_collection.go | 4 + ...host_insight_resource_usage_aggregation.go | 4 + ...urce_usage_trend_aggregation_collection.go | 4 + ...esource_utilization_insight_aggregation.go | 4 + vendor/modules.txt | 2 +- 473 files changed, 25302 insertions(+), 1781 deletions(-) create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_properties.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_properties.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_asset_source_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ebs_asset_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ec2_asset_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/group_identifier.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_association.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_attachment.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_private_ip_address.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/list_supported_cloud_regions_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/monthly_cost_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/placement.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_lifecycle_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/tag.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_asset_source_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ebs_asset_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ec2_asset_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/volume_attachment.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_redundancy_metadata.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_history_entry.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/database/aws_key_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/database/azure_key_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/database/oci_key_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/database/okv_key_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/database/oracle_managed_key_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_operation_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_setting.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_action_state.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_customer_notification_type.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/datascience/restore_archived_model_artifact_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_operation_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_setting.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_export_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_file_system_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_filesystem_snapshot_policy_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_mount_target_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_outbound_connector_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_replication_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_snapshot_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_export_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_file_system_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_filesystem_snapshot_policy_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_mount_target_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_outbound_connector_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_replication_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_snapshot_lock_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/filestorage/resource_lock.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_based_user_action_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/artifact_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_policy.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_product.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_resource.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_target.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_level.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_patch_detail.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_dimension.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_rule_severity.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_association_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_config_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_compliance_policy_rule_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_onboarding_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_patch_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_platform_configuration_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_runbook_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_task_record_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/dependent_patch_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/environment_config_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_entity_specific_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_rule_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_onboarding_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_patch_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_platform_configuration_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policies_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policy_rules_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_records_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_patches_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_platform_configurations_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_resources_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_steps_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_dimension.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_level_selection_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_name_selection_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_product.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_release_date_selection_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_selection_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_severity.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type_config_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/pause_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_config_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_as_product_sub_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_config_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_generic_sub_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_sub_category_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_version_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_credential_entity_specific_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rollback_workflow_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_dimension.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_based_user_action_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_summary.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_compliance_record_counts_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_managed_entity_counts_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_scheduler_job_counts_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_notification_preferences.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/time_based_pause_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_request_response.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_based_pause_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_details.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/variable.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_io_statistics.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend_aggregation.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_aggregation_collection.go create mode 100644 vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_request_response.go diff --git a/go.mod b/go.mod index b86a75c2ec8..23a373212aa 100644 --- a/go.mod +++ b/go.mod @@ -68,6 +68,6 @@ require ( ) // Uncomment this line to get OCI Go SDK from local source instead of github -//replace github.com/oracle/oci-go-sdk => ../../oracle/oci-go-sdk +replace github.com/oracle/oci-go-sdk/v65 v65.76.0 => ./vendor/github.com/oracle/oci-go-sdk go 1.21 diff --git a/go.sum b/go.sum index bffe12df610..1cccc9418da 100644 --- a/go.sum +++ b/go.sum @@ -140,8 +140,6 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/oracle/oci-go-sdk/v65 v65.76.0 h1:mecdD9at/CMaQNEkcC5aMUR9aBF3brdiEyVkDRu/qVc= -github.com/oracle/oci-go-sdk/v65 v65.76.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source.go new file mode 100644 index 00000000000..98d91488ce4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source.go @@ -0,0 +1,192 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsAssetSource AWS asset source. Used for discovery of EC2 instances and EBS volumes registered for the AWS account. +type AwsAssetSource struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + // The detailed state of the asset source. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The time when the asset source was created in the RFC3339 format. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The point in time that the asset source was last updated in the RFC3339 format. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"true" json:"discoveryCredentials"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of an attached discovery schedule. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` + + // The current state of the asset source. + LifecycleState AssetSourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m AwsAssetSource) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsAssetSource) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetDisplayName returns DisplayName +func (m AwsAssetSource) GetDisplayName() *string { + return m.DisplayName +} + +// GetEnvironmentId returns EnvironmentId +func (m AwsAssetSource) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m AwsAssetSource) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m AwsAssetSource) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m AwsAssetSource) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetLifecycleState returns LifecycleState +func (m AwsAssetSource) GetLifecycleState() AssetSourceLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m AwsAssetSource) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetTimeCreated returns TimeCreated +func (m AwsAssetSource) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsAssetSource) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m AwsAssetSource) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsAssetSource) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsAssetSource) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsAssetSource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsAssetSource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetSourceLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetSourceLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsAssetSource) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsAssetSource AwsAssetSource + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAwsAssetSource + }{ + "AWS", + (MarshalTypeAwsAssetSource)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source_summary.go new file mode 100644 index 00000000000..21c58c1f12c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_asset_source_summary.go @@ -0,0 +1,171 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsAssetSourceSummary Summary of an AWS asset source provided in the list. +type AwsAssetSourceSummary struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the resource. + Id *string `mandatory:"true" json:"id"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"true" json:"displayName"` + + // The detailed state of the asset source. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // The time when the asset source was created in RFC3339 format. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The point in time that the asset source was last updated in RFC3339 format. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The current state of the asset source. + LifecycleState AssetSourceLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetId returns Id +func (m AwsAssetSourceSummary) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsAssetSourceSummary) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m AwsAssetSourceSummary) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetDisplayName returns DisplayName +func (m AwsAssetSourceSummary) GetDisplayName() *string { + return m.DisplayName +} + +// GetLifecycleState returns LifecycleState +func (m AwsAssetSourceSummary) GetLifecycleState() AssetSourceLifecycleStateEnum { + return m.LifecycleState +} + +// GetLifecycleDetails returns LifecycleDetails +func (m AwsAssetSourceSummary) GetLifecycleDetails() *string { + return m.LifecycleDetails +} + +// GetInventoryId returns InventoryId +func (m AwsAssetSourceSummary) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m AwsAssetSourceSummary) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetTimeCreated returns TimeCreated +func (m AwsAssetSourceSummary) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsAssetSourceSummary) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetFreeformTags returns FreeformTags +func (m AwsAssetSourceSummary) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsAssetSourceSummary) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsAssetSourceSummary) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsAssetSourceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsAssetSourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetSourceLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetSourceLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsAssetSourceSummary) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsAssetSourceSummary AwsAssetSourceSummary + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeAwsAssetSourceSummary + }{ + "AWS", + (MarshalTypeAwsAssetSourceSummary)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset.go new file mode 100644 index 00000000000..4efe59b9ff1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_asset.go @@ -0,0 +1,166 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsAsset AWS EBS type of asset. +type AwsEbsAsset struct { + + // Inventory ID to which an asset belongs to. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // Asset OCID that is immutable on creation. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment to which an asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key that the asset belongs to. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + // The time when the asset was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time when the asset was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + // The current state of the asset. + LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetDisplayName returns DisplayName +func (m AwsEbsAsset) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m AwsEbsAsset) GetInventoryId() *string { + return m.InventoryId +} + +// GetId returns Id +func (m AwsEbsAsset) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsEbsAsset) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m AwsEbsAsset) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m AwsEbsAsset) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetTimeCreated returns TimeCreated +func (m AwsEbsAsset) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsEbsAsset) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetAssetSourceIds returns AssetSourceIds +func (m AwsEbsAsset) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetLifecycleState returns LifecycleState +func (m AwsEbsAsset) GetLifecycleState() AssetLifecycleStateEnum { + return m.LifecycleState +} + +// GetFreeformTags returns FreeformTags +func (m AwsEbsAsset) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsEbsAsset) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsEbsAsset) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsEbsAsset) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEbsAsset) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsEbsAsset) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsEbsAsset AwsEbsAsset + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeAwsEbsAsset + }{ + "AWS_EBS", + (MarshalTypeAwsEbsAsset)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_properties.go new file mode 100644 index 00000000000..27dbc700948 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ebs_properties.go @@ -0,0 +1,69 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEbsProperties AWS EBS volume related properties. +type AwsEbsProperties struct { + + // Indicates whether the volume is encrypted. + IsEncrypted *bool `mandatory:"true" json:"isEncrypted"` + + // Indicates whether Amazon EBS Multi-Attach is enabled. + IsMultiAttachEnabled *bool `mandatory:"true" json:"isMultiAttachEnabled"` + + // The size of the volume, in GiBs. + SizeInGiBs *int `mandatory:"true" json:"sizeInGiBs"` + + // The ID of the volume. + VolumeKey *string `mandatory:"true" json:"volumeKey"` + + // The volume type. + VolumeType *string `mandatory:"true" json:"volumeType"` + + // Information about the volume attachments. + Attachments []VolumeAttachment `mandatory:"false" json:"attachments"` + + // The Availability Zone for the volume. + AvailabilityZone *string `mandatory:"false" json:"availabilityZone"` + + // The number of I/O operations per second. + Iops *int `mandatory:"false" json:"iops"` + + // The volume state. + Status *string `mandatory:"false" json:"status"` + + // Any tags assigned to the volume. + Tags []Tag `mandatory:"false" json:"tags"` + + // The throughput that the volume supports, in MiB/s. + Throughput *int `mandatory:"false" json:"throughput"` +} + +func (m AwsEbsProperties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEbsProperties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset.go new file mode 100644 index 00000000000..086caff6b9d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_asset.go @@ -0,0 +1,174 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2Asset AWS EC2 type of asset. +type AwsEc2Asset struct { + + // Inventory ID to which an asset belongs to. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // Asset OCID that is immutable on creation. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the compartment to which an asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key that the asset belongs to. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + // The time when the asset was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time when the asset was updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` + + // The current state of the asset. + LifecycleState AssetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` +} + +// GetDisplayName returns DisplayName +func (m AwsEc2Asset) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m AwsEc2Asset) GetInventoryId() *string { + return m.InventoryId +} + +// GetId returns Id +func (m AwsEc2Asset) GetId() *string { + return m.Id +} + +// GetCompartmentId returns CompartmentId +func (m AwsEc2Asset) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m AwsEc2Asset) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m AwsEc2Asset) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetTimeCreated returns TimeCreated +func (m AwsEc2Asset) GetTimeCreated() *common.SDKTime { + return m.TimeCreated +} + +// GetTimeUpdated returns TimeUpdated +func (m AwsEc2Asset) GetTimeUpdated() *common.SDKTime { + return m.TimeUpdated +} + +// GetAssetSourceIds returns AssetSourceIds +func (m AwsEc2Asset) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetLifecycleState returns LifecycleState +func (m AwsEc2Asset) GetLifecycleState() AssetLifecycleStateEnum { + return m.LifecycleState +} + +// GetFreeformTags returns FreeformTags +func (m AwsEc2Asset) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m AwsEc2Asset) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m AwsEc2Asset) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m AwsEc2Asset) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEc2Asset) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingAssetLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetAssetLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsEc2Asset) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsEc2Asset AwsEc2Asset + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeAwsEc2Asset + }{ + "AWS_EC2", + (MarshalTypeAwsEc2Asset)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_properties.go new file mode 100644 index 00000000000..58bd09aec0b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/aws_ec2_properties.go @@ -0,0 +1,133 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsEc2Properties AWS virtual machine related properties. +type AwsEc2Properties struct { + + // The architecture of the image. + Architecture *string `mandatory:"true" json:"architecture"` + + // The ID of the instance. + InstanceKey *string `mandatory:"true" json:"instanceKey"` + + // The instance type. + InstanceType *string `mandatory:"true" json:"instanceType"` + + // The device name of the root device volume. + RootDeviceName *string `mandatory:"true" json:"rootDeviceName"` + + State *InstanceState `mandatory:"true" json:"state"` + + // The boot mode of the instance. + BootMode *string `mandatory:"false" json:"bootMode"` + + // The ID of the Capacity Reservation. + CapacityReservationKey *string `mandatory:"false" json:"capacityReservationKey"` + + // Indicates if the elastic inference accelerators attached to an instance + AreElasticInferenceAcceleratorsPresent *bool `mandatory:"false" json:"areElasticInferenceAcceleratorsPresent"` + + // Indicates whether the instance is enabled for AWS Nitro Enclaves. + IsEnclaveOptions *bool `mandatory:"false" json:"isEnclaveOptions"` + + // Indicates whether the instance is enabled for hibernation. + IsHibernationOptions *bool `mandatory:"false" json:"isHibernationOptions"` + + // The ID of the AMI used to launch the instance. + ImageKey *string `mandatory:"false" json:"imageKey"` + + // Indicates whether this is a Spot Instance or a Scheduled Instance. + InstanceLifecycle *string `mandatory:"false" json:"instanceLifecycle"` + + // The public IPv4 address, or the Carrier IP address assigned to the instance. + IpAddress *string `mandatory:"false" json:"ipAddress"` + + // The IPv6 address assigned to the instance. + Ipv6Address *string `mandatory:"false" json:"ipv6Address"` + + // The kernel associated with this instance, if applicable. + KernelKey *string `mandatory:"false" json:"kernelKey"` + + // The time the instance was launched. + TimeLaunch *common.SDKTime `mandatory:"false" json:"timeLaunch"` + + // The license configurations for the instance. + Licenses []string `mandatory:"false" json:"licenses"` + + // Provides information on the recovery and maintenance options of your instance. + MaintenanceOptions *string `mandatory:"false" json:"maintenanceOptions"` + + // The monitoring for the instance. + Monitoring *string `mandatory:"false" json:"monitoring"` + + // The network interfaces for the instance. + NetworkInterfaces []InstanceNetworkInterface `mandatory:"false" json:"networkInterfaces"` + + Placement *Placement `mandatory:"false" json:"placement"` + + // (IPv4 only) The private DNS hostname name assigned to the instance. + PrivateDnsName *string `mandatory:"false" json:"privateDnsName"` + + // The private IPv4 address assigned to the instance. + PrivateIpAddress *string `mandatory:"false" json:"privateIpAddress"` + + // The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume. + RootDeviceType *string `mandatory:"false" json:"rootDeviceType"` + + // The security groups for the instance. + SecurityGroups []GroupIdentifier `mandatory:"false" json:"securityGroups"` + + // Indicates whether source/destination checking is enabled. + IsSourceDestCheck *bool `mandatory:"false" json:"isSourceDestCheck"` + + // If the request is a Spot Instance request, this value will be true. + IsSpotInstance *bool `mandatory:"false" json:"isSpotInstance"` + + // Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled. + SriovNetSupport *string `mandatory:"false" json:"sriovNetSupport"` + + // EC2-VPC The ID of the subnet in which the instance is running. + SubnetKey *string `mandatory:"false" json:"subnetKey"` + + // Any tags assigned to the instance. + Tags []Tag `mandatory:"false" json:"tags"` + + // If the instance is configured for NitroTPM support, the value is v2.0. + TpmSupport *string `mandatory:"false" json:"tpmSupport"` + + // The virtualization type of the instance. + VirtualizationType *string `mandatory:"false" json:"virtualizationType"` + + // EC2-VPC The ID of the VPC in which the instance is running. + VpcKey *string `mandatory:"false" json:"vpcKey"` +} + +func (m AwsEc2Properties) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsEc2Properties) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_asset_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_asset_source_details.go new file mode 100644 index 00000000000..2a458729d5d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_asset_source_details.go @@ -0,0 +1,150 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsAssetSourceDetails AWS asset source creation request. +type CreateAwsAssetSourceDetails struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment for the resource. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the environment. + EnvironmentId *string `mandatory:"true" json:"environmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the inventory that will contain created assets. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"true" json:"assetsCompartmentId"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"true" json:"discoveryCredentials"` + + // AWS region information, from where the resources are discovered. + AwsRegion *string `mandatory:"true" json:"awsRegion"` + + // The key of customer's aws account to be discovered/migrated. + AwsAccountKey *string `mandatory:"true" json:"awsAccountKey"` + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. The name is generated by the service if it is not + // explicitly provided. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be attached to the created asset. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsAssetSourceDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsAssetSourceDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetEnvironmentId returns EnvironmentId +func (m CreateAwsAssetSourceDetails) GetEnvironmentId() *string { + return m.EnvironmentId +} + +// GetInventoryId returns InventoryId +func (m CreateAwsAssetSourceDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m CreateAwsAssetSourceDetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m CreateAwsAssetSourceDetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsAssetSourceDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsAssetSourceDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m CreateAwsAssetSourceDetails) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m CreateAwsAssetSourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAwsAssetSourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAwsAssetSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsAssetSourceDetails CreateAwsAssetSourceDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeCreateAwsAssetSourceDetails + }{ + "AWS", + (MarshalTypeCreateAwsAssetSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ebs_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ebs_asset_details.go new file mode 100644 index 00000000000..e770cc81d3a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ebs_asset_details.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsEbsAssetDetails Create AWS EBS type of asset. +type CreateAwsEbsAssetDetails struct { + + // Inventory ID to which an asset belongs. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID of the compartment that the asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key to which the asset belongs. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + AwsEbs *AwsEbsProperties `mandatory:"true" json:"awsEbs"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsEbsAssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m CreateAwsEbsAssetDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsEbsAssetDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m CreateAwsEbsAssetDetails) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m CreateAwsEbsAssetDetails) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetAssetSourceIds returns AssetSourceIds +func (m CreateAwsEbsAssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsEbsAssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsEbsAssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateAwsEbsAssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAwsEbsAssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAwsEbsAssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsEbsAssetDetails CreateAwsEbsAssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeCreateAwsEbsAssetDetails + }{ + "AWS_EBS", + (MarshalTypeCreateAwsEbsAssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ec2_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ec2_asset_details.go new file mode 100644 index 00000000000..5f037132ca3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/create_aws_ec2_asset_details.go @@ -0,0 +1,129 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateAwsEc2AssetDetails Create AWS EC2 VM type of asset. +type CreateAwsEc2AssetDetails struct { + + // Inventory ID to which an asset belongs. + InventoryId *string `mandatory:"true" json:"inventoryId"` + + // The OCID of the compartment that the asset belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The source key to which the asset belongs. + SourceKey *string `mandatory:"true" json:"sourceKey"` + + // The key of the asset from the external environment. + ExternalAssetKey *string `mandatory:"true" json:"externalAssetKey"` + + Compute *ComputeProperties `mandatory:"true" json:"compute"` + + Vm *VmProperties `mandatory:"true" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"true" json:"awsEc2"` + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +// GetDisplayName returns DisplayName +func (m CreateAwsEc2AssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetInventoryId returns InventoryId +func (m CreateAwsEc2AssetDetails) GetInventoryId() *string { + return m.InventoryId +} + +// GetCompartmentId returns CompartmentId +func (m CreateAwsEc2AssetDetails) GetCompartmentId() *string { + return m.CompartmentId +} + +// GetSourceKey returns SourceKey +func (m CreateAwsEc2AssetDetails) GetSourceKey() *string { + return m.SourceKey +} + +// GetExternalAssetKey returns ExternalAssetKey +func (m CreateAwsEc2AssetDetails) GetExternalAssetKey() *string { + return m.ExternalAssetKey +} + +// GetAssetSourceIds returns AssetSourceIds +func (m CreateAwsEc2AssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m CreateAwsEc2AssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m CreateAwsEc2AssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m CreateAwsEc2AssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateAwsEc2AssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CreateAwsEc2AssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCreateAwsEc2AssetDetails CreateAwsEc2AssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeCreateAwsEc2AssetDetails + }{ + "AWS_EC2", + (MarshalTypeCreateAwsEc2AssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/group_identifier.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/group_identifier.go new file mode 100644 index 00000000000..5f6cdc984d9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/group_identifier.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GroupIdentifier Describes a security group. +type GroupIdentifier struct { + + // The ID of the security group. + GroupKey *string `mandatory:"false" json:"groupKey"` + + // The name of the security group. + GroupName *string `mandatory:"false" json:"groupName"` +} + +func (m GroupIdentifier) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GroupIdentifier) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface.go new file mode 100644 index 00000000000..d081eae117d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterface Describes a network interface. +type InstanceNetworkInterface struct { + Association *InstanceNetworkInterfaceAssociation `mandatory:"false" json:"association"` + + Attachment *InstanceNetworkInterfaceAttachment `mandatory:"false" json:"attachment"` + + // The description. + Description *string `mandatory:"false" json:"description"` + + // The security groups. + SecurityGroups []GroupIdentifier `mandatory:"false" json:"securityGroups"` + + // The type of network interface. + InterfaceType *string `mandatory:"false" json:"interfaceType"` + + // The IPv4 delegated prefixes that are assigned to the network interface. + Ipv4Prefixes []string `mandatory:"false" json:"ipv4Prefixes"` + + // The IPv6 addresses associated with the network interface. + Ipv6Addresses []string `mandatory:"false" json:"ipv6Addresses"` + + // The IPv6 delegated prefixes that are assigned to the network interface. + Ipv6Prefixes []string `mandatory:"false" json:"ipv6Prefixes"` + + // The MAC address. + MacAddress *string `mandatory:"false" json:"macAddress"` + + // The ID of the network interface. + NetworkInterfaceKey *string `mandatory:"false" json:"networkInterfaceKey"` + + // The ID of the AWS account that created the network interface. + OwnerKey *string `mandatory:"false" json:"ownerKey"` + + // The private IPv4 addresses associated with the network interface. + PrivateIpAddresses []InstancePrivateIpAddress `mandatory:"false" json:"privateIpAddresses"` + + // Indicates whether source/destination checking is enabled. + IsSourceDestCheck *bool `mandatory:"false" json:"isSourceDestCheck"` + + // The status of the network interface. + Status *string `mandatory:"false" json:"status"` + + // The ID of the subnet. + SubnetKey *string `mandatory:"false" json:"subnetKey"` +} + +func (m InstanceNetworkInterface) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceNetworkInterface) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_association.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_association.go new file mode 100644 index 00000000000..5914e83db82 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_association.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterfaceAssociation Describes association information for an Elastic IP address (IPv4). +type InstanceNetworkInterfaceAssociation struct { + + // The carrier IP address associated with the network interface. + CarrierIp *string `mandatory:"false" json:"carrierIp"` + + // The customer-owned IP address associated with the network interface. + CustomerOwnedIp *string `mandatory:"false" json:"customerOwnedIp"` + + // The ID of the owner of the Elastic IP address. + IpOwnerKey *string `mandatory:"false" json:"ipOwnerKey"` + + // The public DNS name. + PublicDnsName *string `mandatory:"false" json:"publicDnsName"` + + // The public IP address or Elastic IP address bound to the network interface. + PublicIp *string `mandatory:"false" json:"publicIp"` +} + +func (m InstanceNetworkInterfaceAssociation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceNetworkInterfaceAssociation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_attachment.go new file mode 100644 index 00000000000..c96dd9e2233 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_network_interface_attachment.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceNetworkInterfaceAttachment Describes a network interface attachment. +type InstanceNetworkInterfaceAttachment struct { + + // The ID of the network interface attachment. + AttachmentKey *string `mandatory:"false" json:"attachmentKey"` + + // The timestamp when the attachment initiated. + TimeAttach *common.SDKTime `mandatory:"false" json:"timeAttach"` + + // Indicates whether the network interface is deleted when the instance is terminated. + IsDeleteOnTermination *bool `mandatory:"false" json:"isDeleteOnTermination"` + + // The index of the device on the instance for the network interface attachment. + DeviceIndex *int `mandatory:"false" json:"deviceIndex"` + + // The index of the network card. + NetworkCardIndex *int `mandatory:"false" json:"networkCardIndex"` + + // The attachment state. + Status *string `mandatory:"false" json:"status"` +} + +func (m InstanceNetworkInterfaceAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceNetworkInterfaceAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_private_ip_address.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_private_ip_address.go new file mode 100644 index 00000000000..d7bca8576ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_private_ip_address.go @@ -0,0 +1,46 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstancePrivateIpAddress Describes a private IPv4 address. +type InstancePrivateIpAddress struct { + Association *InstanceNetworkInterfaceAssociation `mandatory:"false" json:"association"` + + // Indicates whether this IPv4 address is the primary private IP address of the network interface. + IsPrimary *bool `mandatory:"false" json:"isPrimary"` + + // The private IPv4 DNS name. + PrivateDnsName *string `mandatory:"false" json:"privateDnsName"` + + // The private IPv4 address of the network interface. + PrivateIpAddress *string `mandatory:"false" json:"privateIpAddress"` +} + +func (m InstancePrivateIpAddress) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstancePrivateIpAddress) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_state.go new file mode 100644 index 00000000000..3686f7f462e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/instance_state.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// InstanceState Describes the current state of an instance. +type InstanceState struct { + + // The state of the instance as a 16-bit unsigned integer. + Code *int `mandatory:"false" json:"code"` + + // The current state of the instance. + Name *string `mandatory:"false" json:"name"` +} + +func (m InstanceState) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m InstanceState) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/list_supported_cloud_regions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/list_supported_cloud_regions_request_response.go new file mode 100644 index 00000000000..7ba5887aaa9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/list_supported_cloud_regions_request_response.go @@ -0,0 +1,241 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListSupportedCloudRegionsRequest wrapper for the ListSupportedCloudRegions operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/cloudbridge/ListSupportedCloudRegions.go.html to see an example of how to use ListSupportedCloudRegionsRequest. +type ListSupportedCloudRegionsRequest struct { + + // The asset source type. + AssetSourceType ListSupportedCloudRegionsAssetSourceTypeEnum `mandatory:"false" contributesTo:"query" name:"assetSourceType" omitEmpty:"true"` + + // A filter to return only supported cloud regions which name contains given nameContains as sub-string. + NameContains *string `mandatory:"false" contributesTo:"query" name:"nameContains"` + + // The field to sort by. Only one sort order may be provided. By default, name is in ascending order. + SortBy ListSupportedCloudRegionsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListSupportedCloudRegionsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListSupportedCloudRegionsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListSupportedCloudRegionsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListSupportedCloudRegionsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListSupportedCloudRegionsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListSupportedCloudRegionsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListSupportedCloudRegionsAssetSourceTypeEnum(string(request.AssetSourceType)); !ok && request.AssetSourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssetSourceType: %s. Supported values are: %s.", request.AssetSourceType, strings.Join(GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingListSupportedCloudRegionsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListSupportedCloudRegionsSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListSupportedCloudRegionsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListSupportedCloudRegionsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListSupportedCloudRegionsResponse wrapper for the ListSupportedCloudRegions operation +type ListSupportedCloudRegionsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SupportedCloudRegionCollection instances + SupportedCloudRegionCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListSupportedCloudRegionsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListSupportedCloudRegionsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListSupportedCloudRegionsAssetSourceTypeEnum Enum with underlying type: string +type ListSupportedCloudRegionsAssetSourceTypeEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsAssetSourceTypeEnum +const ( + ListSupportedCloudRegionsAssetSourceTypeVmware ListSupportedCloudRegionsAssetSourceTypeEnum = "VMWARE" + ListSupportedCloudRegionsAssetSourceTypeAws ListSupportedCloudRegionsAssetSourceTypeEnum = "AWS" +) + +var mappingListSupportedCloudRegionsAssetSourceTypeEnum = map[string]ListSupportedCloudRegionsAssetSourceTypeEnum{ + "VMWARE": ListSupportedCloudRegionsAssetSourceTypeVmware, + "AWS": ListSupportedCloudRegionsAssetSourceTypeAws, +} + +var mappingListSupportedCloudRegionsAssetSourceTypeEnumLowerCase = map[string]ListSupportedCloudRegionsAssetSourceTypeEnum{ + "vmware": ListSupportedCloudRegionsAssetSourceTypeVmware, + "aws": ListSupportedCloudRegionsAssetSourceTypeAws, +} + +// GetListSupportedCloudRegionsAssetSourceTypeEnumValues Enumerates the set of values for ListSupportedCloudRegionsAssetSourceTypeEnum +func GetListSupportedCloudRegionsAssetSourceTypeEnumValues() []ListSupportedCloudRegionsAssetSourceTypeEnum { + values := make([]ListSupportedCloudRegionsAssetSourceTypeEnum, 0) + for _, v := range mappingListSupportedCloudRegionsAssetSourceTypeEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsAssetSourceTypeEnum +func GetListSupportedCloudRegionsAssetSourceTypeEnumStringValues() []string { + return []string{ + "VMWARE", + "AWS", + } +} + +// GetMappingListSupportedCloudRegionsAssetSourceTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsAssetSourceTypeEnum(val string) (ListSupportedCloudRegionsAssetSourceTypeEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsAssetSourceTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSupportedCloudRegionsSortByEnum Enum with underlying type: string +type ListSupportedCloudRegionsSortByEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsSortByEnum +const ( + ListSupportedCloudRegionsSortByName ListSupportedCloudRegionsSortByEnum = "name" +) + +var mappingListSupportedCloudRegionsSortByEnum = map[string]ListSupportedCloudRegionsSortByEnum{ + "name": ListSupportedCloudRegionsSortByName, +} + +var mappingListSupportedCloudRegionsSortByEnumLowerCase = map[string]ListSupportedCloudRegionsSortByEnum{ + "name": ListSupportedCloudRegionsSortByName, +} + +// GetListSupportedCloudRegionsSortByEnumValues Enumerates the set of values for ListSupportedCloudRegionsSortByEnum +func GetListSupportedCloudRegionsSortByEnumValues() []ListSupportedCloudRegionsSortByEnum { + values := make([]ListSupportedCloudRegionsSortByEnum, 0) + for _, v := range mappingListSupportedCloudRegionsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsSortByEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsSortByEnum +func GetListSupportedCloudRegionsSortByEnumStringValues() []string { + return []string{ + "name", + } +} + +// GetMappingListSupportedCloudRegionsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsSortByEnum(val string) (ListSupportedCloudRegionsSortByEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListSupportedCloudRegionsSortOrderEnum Enum with underlying type: string +type ListSupportedCloudRegionsSortOrderEnum string + +// Set of constants representing the allowable values for ListSupportedCloudRegionsSortOrderEnum +const ( + ListSupportedCloudRegionsSortOrderAsc ListSupportedCloudRegionsSortOrderEnum = "ASC" + ListSupportedCloudRegionsSortOrderDesc ListSupportedCloudRegionsSortOrderEnum = "DESC" +) + +var mappingListSupportedCloudRegionsSortOrderEnum = map[string]ListSupportedCloudRegionsSortOrderEnum{ + "ASC": ListSupportedCloudRegionsSortOrderAsc, + "DESC": ListSupportedCloudRegionsSortOrderDesc, +} + +var mappingListSupportedCloudRegionsSortOrderEnumLowerCase = map[string]ListSupportedCloudRegionsSortOrderEnum{ + "asc": ListSupportedCloudRegionsSortOrderAsc, + "desc": ListSupportedCloudRegionsSortOrderDesc, +} + +// GetListSupportedCloudRegionsSortOrderEnumValues Enumerates the set of values for ListSupportedCloudRegionsSortOrderEnum +func GetListSupportedCloudRegionsSortOrderEnumValues() []ListSupportedCloudRegionsSortOrderEnum { + values := make([]ListSupportedCloudRegionsSortOrderEnum, 0) + for _, v := range mappingListSupportedCloudRegionsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListSupportedCloudRegionsSortOrderEnumStringValues Enumerates the set of values in String for ListSupportedCloudRegionsSortOrderEnum +func GetListSupportedCloudRegionsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListSupportedCloudRegionsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListSupportedCloudRegionsSortOrderEnum(val string) (ListSupportedCloudRegionsSortOrderEnum, bool) { + enum, ok := mappingListSupportedCloudRegionsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/monthly_cost_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/monthly_cost_summary.go new file mode 100644 index 00000000000..0865acd6c2a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/monthly_cost_summary.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// MonthlyCostSummary Cost information for monthly maintenance. +type MonthlyCostSummary struct { + + // Monthly costs for maintenance of this asset. + Amount *float64 `mandatory:"true" json:"amount"` + + // Currency code as defined by ISO-4217. + CurrencyCode *string `mandatory:"true" json:"currencyCode"` +} + +func (m MonthlyCostSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m MonthlyCostSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/placement.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/placement.go new file mode 100644 index 00000000000..a0eeeef07b2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/placement.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Placement Describes the placement of an instance. +type Placement struct { + + // The affinity setting for the instance on the Dedicated Host. + Affinity *string `mandatory:"false" json:"affinity"` + + // The Availability Zone of the instance. + AvailabilityZone *string `mandatory:"false" json:"availabilityZone"` + + // The name of the placement group the instance is in. + GroupName *string `mandatory:"false" json:"groupName"` + + // The ID of the Dedicated Host on which the instance resides. + HostKey *string `mandatory:"false" json:"hostKey"` + + // The ARN of the host resource group in which to launch the instances. + HostResourceGroupArn *string `mandatory:"false" json:"hostResourceGroupArn"` + + // The number of the partition that the instance is in. + PartitionNumber *int `mandatory:"false" json:"partitionNumber"` + + // Reserved for future use. + SpreadDomain *string `mandatory:"false" json:"spreadDomain"` + + // The tenancy of the instance (if the instance is running in a VPC). + Tenancy *string `mandatory:"false" json:"tenancy"` +} + +func (m Placement) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Placement) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_collection.go new file mode 100644 index 00000000000..5ad3ca78a99 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SupportedCloudRegionCollection Collection of supported cloud regions. +type SupportedCloudRegionCollection struct { + + // List of supported cloud regions. + Items []SupportedCloudRegionSummary `mandatory:"true" json:"items"` +} + +func (m SupportedCloudRegionCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SupportedCloudRegionCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_lifecycle_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_lifecycle_state.go new file mode 100644 index 00000000000..95577bbb378 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_lifecycle_state.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "strings" +) + +// SupportedCloudRegionLifecycleStateEnum Enum with underlying type: string +type SupportedCloudRegionLifecycleStateEnum string + +// Set of constants representing the allowable values for SupportedCloudRegionLifecycleStateEnum +const ( + SupportedCloudRegionLifecycleStateActive SupportedCloudRegionLifecycleStateEnum = "ACTIVE" + SupportedCloudRegionLifecycleStateInactive SupportedCloudRegionLifecycleStateEnum = "INACTIVE" +) + +var mappingSupportedCloudRegionLifecycleStateEnum = map[string]SupportedCloudRegionLifecycleStateEnum{ + "ACTIVE": SupportedCloudRegionLifecycleStateActive, + "INACTIVE": SupportedCloudRegionLifecycleStateInactive, +} + +var mappingSupportedCloudRegionLifecycleStateEnumLowerCase = map[string]SupportedCloudRegionLifecycleStateEnum{ + "active": SupportedCloudRegionLifecycleStateActive, + "inactive": SupportedCloudRegionLifecycleStateInactive, +} + +// GetSupportedCloudRegionLifecycleStateEnumValues Enumerates the set of values for SupportedCloudRegionLifecycleStateEnum +func GetSupportedCloudRegionLifecycleStateEnumValues() []SupportedCloudRegionLifecycleStateEnum { + values := make([]SupportedCloudRegionLifecycleStateEnum, 0) + for _, v := range mappingSupportedCloudRegionLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetSupportedCloudRegionLifecycleStateEnumStringValues Enumerates the set of values in String for SupportedCloudRegionLifecycleStateEnum +func GetSupportedCloudRegionLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + } +} + +// GetMappingSupportedCloudRegionLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSupportedCloudRegionLifecycleStateEnum(val string) (SupportedCloudRegionLifecycleStateEnum, bool) { + enum, ok := mappingSupportedCloudRegionLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_summary.go new file mode 100644 index 00000000000..1bcfb726af7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/supported_cloud_region_summary.go @@ -0,0 +1,61 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SupportedCloudRegionSummary Summary of the supported cloud region. +type SupportedCloudRegionSummary struct { + + // The asset source type associated with the supported cloud region. + AssetSourceType AssetSourceTypeEnum `mandatory:"true" json:"assetSourceType"` + + // The supported cloud region name. + Name *string `mandatory:"true" json:"name"` + + // The current state of the supported cloud region. + LifecycleState SupportedCloudRegionLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m SupportedCloudRegionSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SupportedCloudRegionSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingAssetSourceTypeEnum(string(m.AssetSourceType)); !ok && m.AssetSourceType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for AssetSourceType: %s. Supported values are: %s.", m.AssetSourceType, strings.Join(GetAssetSourceTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingSupportedCloudRegionLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetSupportedCloudRegionLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/tag.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/tag.go new file mode 100644 index 00000000000..334284f8ada --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/tag.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Tag Describes a tag. +type Tag struct { + + // The key of the tag. + Key *string `mandatory:"false" json:"key"` + + // The value of the tag. + Value *string `mandatory:"false" json:"value"` +} + +func (m Tag) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Tag) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_asset_source_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_asset_source_details.go new file mode 100644 index 00000000000..3e483f60a94 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_asset_source_details.go @@ -0,0 +1,119 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsAssetSourceDetails AWS asset source update request. +type UpdateAwsAssetSourceDetails struct { + + // A user-friendly name for the asset source. Does not have to be unique, and it's mutable. + // Avoid entering confidential information. + DisplayName *string `mandatory:"false" json:"displayName"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that is going to be used to create assets. + AssetsCompartmentId *string `mandatory:"false" json:"assetsCompartmentId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the discovery schedule that is going to be assigned to an asset source. + DiscoveryScheduleId *string `mandatory:"false" json:"discoveryScheduleId"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{orcl-cloud: {free-tier-retain: true}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` + + DiscoveryCredentials *AssetSourceCredentials `mandatory:"false" json:"discoveryCredentials"` + + ReplicationCredentials *AssetSourceCredentials `mandatory:"false" json:"replicationCredentials"` + + // Flag indicating whether historical metrics are collected for assets, originating from this asset source. + AreHistoricalMetricsCollected *bool `mandatory:"false" json:"areHistoricalMetricsCollected"` + + // Flag indicating whether real-time metrics are collected for assets, originating from this asset source. + AreRealtimeMetricsCollected *bool `mandatory:"false" json:"areRealtimeMetricsCollected"` + + // Flag indicating whether cost data collection is enabled for assets, originating from this asset source. + IsCostInformationCollected *bool `mandatory:"false" json:"isCostInformationCollected"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsAssetSourceDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetsCompartmentId returns AssetsCompartmentId +func (m UpdateAwsAssetSourceDetails) GetAssetsCompartmentId() *string { + return m.AssetsCompartmentId +} + +// GetDiscoveryScheduleId returns DiscoveryScheduleId +func (m UpdateAwsAssetSourceDetails) GetDiscoveryScheduleId() *string { + return m.DiscoveryScheduleId +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsAssetSourceDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsAssetSourceDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +// GetSystemTags returns SystemTags +func (m UpdateAwsAssetSourceDetails) GetSystemTags() map[string]map[string]interface{} { + return m.SystemTags +} + +func (m UpdateAwsAssetSourceDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAwsAssetSourceDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAwsAssetSourceDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsAssetSourceDetails UpdateAwsAssetSourceDetails + s := struct { + DiscriminatorParam string `json:"type"` + MarshalTypeUpdateAwsAssetSourceDetails + }{ + "AWS", + (MarshalTypeUpdateAwsAssetSourceDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ebs_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ebs_asset_details.go new file mode 100644 index 00000000000..e00f831c633 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ebs_asset_details.go @@ -0,0 +1,89 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsEbsAssetDetails The information of AWS EBS asset to be updated. +type UpdateAwsEbsAssetDetails struct { + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + AwsEbs *AwsEbsProperties `mandatory:"false" json:"awsEbs"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsEbsAssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetSourceIds returns AssetSourceIds +func (m UpdateAwsEbsAssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsEbsAssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsEbsAssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateAwsEbsAssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAwsEbsAssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAwsEbsAssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsEbsAssetDetails UpdateAwsEbsAssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeUpdateAwsEbsAssetDetails + }{ + "AWS_EBS", + (MarshalTypeUpdateAwsEbsAssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ec2_asset_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ec2_asset_details.go new file mode 100644 index 00000000000..749f1dae786 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/update_aws_ec2_asset_details.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateAwsEc2AssetDetails The information of AWS VM asset to be updated. +type UpdateAwsEc2AssetDetails struct { + + // Asset display name. + DisplayName *string `mandatory:"false" json:"displayName"` + + // List of asset source OCID. + AssetSourceIds []string `mandatory:"false" json:"assetSourceIds"` + + // The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no + // predefined name, type, or namespace/scope. For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Department": "Finance"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. + // For more information, see Resource Tags (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + // Example: `{"Operations": {"CostCenter": "42"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + Compute *ComputeProperties `mandatory:"false" json:"compute"` + + Vm *VmProperties `mandatory:"false" json:"vm"` + + AwsEc2 *AwsEc2Properties `mandatory:"false" json:"awsEc2"` + + AwsEc2Cost *MonthlyCostSummary `mandatory:"false" json:"awsEc2Cost"` + + AttachedEbsVolumesCost *MonthlyCostSummary `mandatory:"false" json:"attachedEbsVolumesCost"` +} + +// GetDisplayName returns DisplayName +func (m UpdateAwsEc2AssetDetails) GetDisplayName() *string { + return m.DisplayName +} + +// GetAssetSourceIds returns AssetSourceIds +func (m UpdateAwsEc2AssetDetails) GetAssetSourceIds() []string { + return m.AssetSourceIds +} + +// GetFreeformTags returns FreeformTags +func (m UpdateAwsEc2AssetDetails) GetFreeformTags() map[string]string { + return m.FreeformTags +} + +// GetDefinedTags returns DefinedTags +func (m UpdateAwsEc2AssetDetails) GetDefinedTags() map[string]map[string]interface{} { + return m.DefinedTags +} + +func (m UpdateAwsEc2AssetDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateAwsEc2AssetDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UpdateAwsEc2AssetDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUpdateAwsEc2AssetDetails UpdateAwsEc2AssetDetails + s := struct { + DiscriminatorParam string `json:"assetType"` + MarshalTypeUpdateAwsEc2AssetDetails + }{ + "AWS_EC2", + (MarshalTypeUpdateAwsEc2AssetDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/volume_attachment.go b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/volume_attachment.go new file mode 100644 index 00000000000..54ffadb292a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/cloudbridge/volume_attachment.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Oracle Cloud Bridge API +// +// API for Oracle Cloud Bridge service. +// + +package cloudbridge + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VolumeAttachment Describes volume attachment details. +type VolumeAttachment struct { + + // Indicates whether the EBS volume is deleted on instance termination. + IsDeleteOnTermination *bool `mandatory:"false" json:"isDeleteOnTermination"` + + // The device name. + Device *string `mandatory:"false" json:"device"` + + // The ID of the instance. + InstanceKey *string `mandatory:"false" json:"instanceKey"` + + // The attachment state of the volume. + Status *string `mandatory:"false" json:"status"` + + // The ID of the volume. + VolumeKey *string `mandatory:"false" json:"volumeKey"` +} + +func (m VolumeAttachment) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VolumeAttachment) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go index a49bbfdf19a..03a12a54e68 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/common/version.go @@ -12,7 +12,7 @@ import ( const ( major = "65" - minor = "76" + minor = "77" patch = "0" tag = "" ) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go index ff2e20351b3..fc94e57af99 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/containerengine/containerengine_client.go @@ -142,7 +142,7 @@ func (client ContainerEngineClient) clusterMigrateToNativeVcn(ctx context.Contex defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ClusterMigrateToNativeVcn" err = common.PostProcessServiceError(err, "ContainerEngine", "ClusterMigrateToNativeVcn", apiReferenceLink) return response, err } @@ -205,7 +205,7 @@ func (client ContainerEngineClient) completeCredentialRotation(ctx context.Conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CompleteCredentialRotation" err = common.PostProcessServiceError(err, "ContainerEngine", "CompleteCredentialRotation", apiReferenceLink) return response, err } @@ -268,7 +268,7 @@ func (client ContainerEngineClient) createCluster(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateCluster" err = common.PostProcessServiceError(err, "ContainerEngine", "CreateCluster", apiReferenceLink) return response, err } @@ -325,7 +325,7 @@ func (client ContainerEngineClient) createKubeconfig(ctx context.Context, reques httpResponse, err = client.Call(ctx, &httpRequest) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/CreateKubeconfig" err = common.PostProcessServiceError(err, "ContainerEngine", "CreateKubeconfig", apiReferenceLink) return response, err } @@ -388,7 +388,7 @@ func (client ContainerEngineClient) createNodePool(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/CreateNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "CreateNodePool", apiReferenceLink) return response, err } @@ -451,7 +451,7 @@ func (client ContainerEngineClient) createVirtualNodePool(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/CreateVirtualNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "CreateVirtualNodePool", apiReferenceLink) return response, err } @@ -514,7 +514,7 @@ func (client ContainerEngineClient) createWorkloadMapping(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/CreateWorkloadMapping" err = common.PostProcessServiceError(err, "ContainerEngine", "CreateWorkloadMapping", apiReferenceLink) return response, err } @@ -572,7 +572,7 @@ func (client ContainerEngineClient) deleteCluster(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DeleteCluster" err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteCluster", apiReferenceLink) return response, err } @@ -630,7 +630,7 @@ func (client ContainerEngineClient) deleteNode(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNode" err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteNode", apiReferenceLink) return response, err } @@ -688,7 +688,7 @@ func (client ContainerEngineClient) deleteNodePool(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/DeleteNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteNodePool", apiReferenceLink) return response, err } @@ -746,7 +746,7 @@ func (client ContainerEngineClient) deleteVirtualNodePool(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/DeleteVirtualNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteVirtualNodePool", apiReferenceLink) return response, err } @@ -804,7 +804,7 @@ func (client ContainerEngineClient) deleteWorkRequest(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/DeleteWorkRequest" err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteWorkRequest", apiReferenceLink) return response, err } @@ -862,7 +862,7 @@ func (client ContainerEngineClient) deleteWorkloadMapping(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/DeleteWorkloadMapping" err = common.PostProcessServiceError(err, "ContainerEngine", "DeleteWorkloadMapping", apiReferenceLink) return response, err } @@ -920,7 +920,7 @@ func (client ContainerEngineClient) disableAddon(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/DisableAddon" err = common.PostProcessServiceError(err, "ContainerEngine", "DisableAddon", apiReferenceLink) return response, err } @@ -978,7 +978,7 @@ func (client ContainerEngineClient) getAddon(ctx context.Context, request common defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetAddon" err = common.PostProcessServiceError(err, "ContainerEngine", "GetAddon", apiReferenceLink) return response, err } @@ -1036,7 +1036,7 @@ func (client ContainerEngineClient) getCluster(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/GetCluster" err = common.PostProcessServiceError(err, "ContainerEngine", "GetCluster", apiReferenceLink) return response, err } @@ -1094,7 +1094,7 @@ func (client ContainerEngineClient) getClusterMigrateToNativeVcnStatus(ctx conte defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterMigrateToNativeVcnStatus/GetClusterMigrateToNativeVcnStatus" err = common.PostProcessServiceError(err, "ContainerEngine", "GetClusterMigrateToNativeVcnStatus", apiReferenceLink) return response, err } @@ -1152,7 +1152,7 @@ func (client ContainerEngineClient) getClusterOptions(ctx context.Context, reque defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterOptions/GetClusterOptions" err = common.PostProcessServiceError(err, "ContainerEngine", "GetClusterOptions", apiReferenceLink) return response, err } @@ -1210,7 +1210,7 @@ func (client ContainerEngineClient) getCredentialRotationStatus(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/CredentialRotationStatus/GetCredentialRotationStatus" err = common.PostProcessServiceError(err, "ContainerEngine", "GetCredentialRotationStatus", apiReferenceLink) return response, err } @@ -1268,7 +1268,7 @@ func (client ContainerEngineClient) getNodePool(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/GetNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "GetNodePool", apiReferenceLink) return response, err } @@ -1326,7 +1326,7 @@ func (client ContainerEngineClient) getNodePoolOptions(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolOptions/GetNodePoolOptions" err = common.PostProcessServiceError(err, "ContainerEngine", "GetNodePoolOptions", apiReferenceLink) return response, err } @@ -1384,7 +1384,7 @@ func (client ContainerEngineClient) getVirtualNode(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNode" err = common.PostProcessServiceError(err, "ContainerEngine", "GetVirtualNode", apiReferenceLink) return response, err } @@ -1442,7 +1442,7 @@ func (client ContainerEngineClient) getVirtualNodePool(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/GetVirtualNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "GetVirtualNodePool", apiReferenceLink) return response, err } @@ -1500,7 +1500,7 @@ func (client ContainerEngineClient) getWorkRequest(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequest/GetWorkRequest" err = common.PostProcessServiceError(err, "ContainerEngine", "GetWorkRequest", apiReferenceLink) return response, err } @@ -1558,7 +1558,7 @@ func (client ContainerEngineClient) getWorkloadMapping(ctx context.Context, requ defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/GetWorkloadMapping" err = common.PostProcessServiceError(err, "ContainerEngine", "GetWorkloadMapping", apiReferenceLink) return response, err } @@ -1621,7 +1621,7 @@ func (client ContainerEngineClient) installAddon(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/InstallAddon" err = common.PostProcessServiceError(err, "ContainerEngine", "InstallAddon", apiReferenceLink) return response, err } @@ -1679,7 +1679,7 @@ func (client ContainerEngineClient) listAddonOptions(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/AddonOptionSummary/ListAddonOptions" err = common.PostProcessServiceError(err, "ContainerEngine", "ListAddonOptions", apiReferenceLink) return response, err } @@ -1737,7 +1737,7 @@ func (client ContainerEngineClient) listAddons(ctx context.Context, request comm defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/ListAddons" err = common.PostProcessServiceError(err, "ContainerEngine", "ListAddons", apiReferenceLink) return response, err } @@ -1795,7 +1795,7 @@ func (client ContainerEngineClient) listClusters(ctx context.Context, request co defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/ClusterSummary/ListClusters" err = common.PostProcessServiceError(err, "ContainerEngine", "ListClusters", apiReferenceLink) return response, err } @@ -1853,7 +1853,7 @@ func (client ContainerEngineClient) listNodePools(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePoolSummary/ListNodePools" err = common.PostProcessServiceError(err, "ContainerEngine", "ListNodePools", apiReferenceLink) return response, err } @@ -1911,7 +1911,7 @@ func (client ContainerEngineClient) listPodShapes(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/PodShapeSummary/ListPodShapes" err = common.PostProcessServiceError(err, "ContainerEngine", "ListPodShapes", apiReferenceLink) return response, err } @@ -1969,7 +1969,7 @@ func (client ContainerEngineClient) listVirtualNodePools(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePoolSummary/ListVirtualNodePools" err = common.PostProcessServiceError(err, "ContainerEngine", "ListVirtualNodePools", apiReferenceLink) return response, err } @@ -2027,7 +2027,7 @@ func (client ContainerEngineClient) listVirtualNodes(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/ListVirtualNodes" err = common.PostProcessServiceError(err, "ContainerEngine", "ListVirtualNodes", apiReferenceLink) return response, err } @@ -2085,7 +2085,7 @@ func (client ContainerEngineClient) listWorkRequestErrors(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestError/ListWorkRequestErrors" err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkRequestErrors", apiReferenceLink) return response, err } @@ -2143,7 +2143,7 @@ func (client ContainerEngineClient) listWorkRequestLogs(ctx context.Context, req defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestLogEntry/ListWorkRequestLogs" err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkRequestLogs", apiReferenceLink) return response, err } @@ -2201,7 +2201,7 @@ func (client ContainerEngineClient) listWorkRequests(ctx context.Context, reques defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkRequestSummary/ListWorkRequests" err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkRequests", apiReferenceLink) return response, err } @@ -2259,7 +2259,7 @@ func (client ContainerEngineClient) listWorkloadMappings(ctx context.Context, re defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/ListWorkloadMappings" err = common.PostProcessServiceError(err, "ContainerEngine", "ListWorkloadMappings", apiReferenceLink) return response, err } @@ -2322,7 +2322,7 @@ func (client ContainerEngineClient) startCredentialRotation(ctx context.Context, defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/StartCredentialRotation" err = common.PostProcessServiceError(err, "ContainerEngine", "StartCredentialRotation", apiReferenceLink) return response, err } @@ -2380,7 +2380,7 @@ func (client ContainerEngineClient) updateAddon(ctx context.Context, request com defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateAddon" err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateAddon", apiReferenceLink) return response, err } @@ -2438,7 +2438,7 @@ func (client ContainerEngineClient) updateCluster(ctx context.Context, request c defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateCluster" err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateCluster", apiReferenceLink) return response, err } @@ -2496,7 +2496,7 @@ func (client ContainerEngineClient) updateClusterEndpointConfig(ctx context.Cont defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/Cluster/UpdateClusterEndpointConfig" err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateClusterEndpointConfig", apiReferenceLink) return response, err } @@ -2554,7 +2554,7 @@ func (client ContainerEngineClient) updateNodePool(ctx context.Context, request defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/UpdateNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateNodePool", apiReferenceLink) return response, err } @@ -2612,7 +2612,7 @@ func (client ContainerEngineClient) updateVirtualNodePool(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/VirtualNodePool/UpdateVirtualNodePool" err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateVirtualNodePool", apiReferenceLink) return response, err } @@ -2670,7 +2670,7 @@ func (client ContainerEngineClient) updateWorkloadMapping(ctx context.Context, r defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "" + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/WorkloadMapping/UpdateWorkloadMapping" err = common.PostProcessServiceError(err, "ContainerEngine", "UpdateWorkloadMapping", apiReferenceLink) return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go index 43058ba70fe..cab04c9cab9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit.go @@ -164,6 +164,8 @@ type VirtualCircuit struct { // The layer 3 IP MTU to use on this virtual circuit. IpMtu VirtualCircuitIpMtuEnum `mandatory:"false" json:"ipMtu,omitempty"` + + VirtualCircuitRedundancyMetadata *VirtualCircuitRedundancyMetadata `mandatory:"false" json:"virtualCircuitRedundancyMetadata"` } func (m VirtualCircuit) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_redundancy_metadata.go b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_redundancy_metadata.go new file mode 100644 index 00000000000..ae667d46dc4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/core/virtual_circuit_redundancy_metadata.go @@ -0,0 +1,206 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Core Services API +// +// Use the Core Services API to manage resources such as virtual cloud networks (VCNs), +// compute instances, and block storage volumes. For more information, see the console +// documentation for the Networking (https://docs.cloud.oracle.com/iaas/Content/Network/Concepts/overview.htm), +// Compute (https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/computeoverview.htm), and +// Block Volume (https://docs.cloud.oracle.com/iaas/Content/Block/Concepts/overview.htm) services. +// The required permissions are documented in the +// Details for the Core Services (https://docs.cloud.oracle.com/iaas/Content/Identity/Reference/corepolicyreference.htm) article. +// + +package core + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// VirtualCircuitRedundancyMetadata Redundancy level details of the virtual circuit +type VirtualCircuitRedundancyMetadata struct { + + // The configured redundancy level of the virtual circuit + ConfiguredRedundancyLevel VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum `mandatory:"false" json:"configuredRedundancyLevel,omitempty"` + + // IPV4 BGP redundancy status indicates if the configured redundancy level is met + Ipv4bgpSessionRedundancyStatus VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum `mandatory:"false" json:"ipv4bgpSessionRedundancyStatus,omitempty"` + + // IPV6 BGP redundancy status indicates if the configured redundancy level is met + Ipv6bgpSessionRedundancyStatus VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum `mandatory:"false" json:"ipv6bgpSessionRedundancyStatus,omitempty"` +} + +func (m VirtualCircuitRedundancyMetadata) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m VirtualCircuitRedundancyMetadata) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum(string(m.ConfiguredRedundancyLevel)); !ok && m.ConfiguredRedundancyLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConfiguredRedundancyLevel: %s. Supported values are: %s.", m.ConfiguredRedundancyLevel, strings.Join(GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum(string(m.Ipv4bgpSessionRedundancyStatus)); !ok && m.Ipv4bgpSessionRedundancyStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Ipv4bgpSessionRedundancyStatus: %s. Supported values are: %s.", m.Ipv4bgpSessionRedundancyStatus, strings.Join(GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumStringValues(), ","))) + } + if _, ok := GetMappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum(string(m.Ipv6bgpSessionRedundancyStatus)); !ok && m.Ipv6bgpSessionRedundancyStatus != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Ipv6bgpSessionRedundancyStatus: %s. Supported values are: %s.", m.Ipv6bgpSessionRedundancyStatus, strings.Join(GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum Enum with underlying type: string +type VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum string + +// Set of constants representing the allowable values for VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum +const ( + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelDevice VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "DEVICE" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPop VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "POP" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelRegion VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "REGION" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelNonRedundant VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "NON_REDUNDANT" + VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPending VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = "PENDING" +) + +var mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum = map[string]VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum{ + "DEVICE": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelDevice, + "POP": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPop, + "REGION": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelRegion, + "NON_REDUNDANT": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelNonRedundant, + "PENDING": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPending, +} + +var mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumLowerCase = map[string]VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum{ + "device": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelDevice, + "pop": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPop, + "region": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelRegion, + "non_redundant": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelNonRedundant, + "pending": VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelPending, +} + +// GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumValues Enumerates the set of values for VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum +func GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumValues() []VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum { + values := make([]VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum, 0) + for _, v := range mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumStringValues Enumerates the set of values in String for VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum +func GetVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumStringValues() []string { + return []string{ + "DEVICE", + "POP", + "REGION", + "NON_REDUNDANT", + "PENDING", + } +} + +// GetMappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum(val string) (VirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnum, bool) { + enum, ok := mappingVirtualCircuitRedundancyMetadataConfiguredRedundancyLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum Enum with underlying type: string +type VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum string + +// Set of constants representing the allowable values for VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum +const ( + VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMatch VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = "CONFIGURATION_MATCH" + VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMismatch VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = "CONFIGURATION_MISMATCH" + VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusNotMetSla VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = "NOT_MET_SLA" +) + +var mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum = map[string]VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum{ + "CONFIGURATION_MATCH": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMatch, + "CONFIGURATION_MISMATCH": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMismatch, + "NOT_MET_SLA": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusNotMetSla, +} + +var mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumLowerCase = map[string]VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum{ + "configuration_match": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMatch, + "configuration_mismatch": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusConfigurationMismatch, + "not_met_sla": VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusNotMetSla, +} + +// GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumValues Enumerates the set of values for VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumValues() []VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum { + values := make([]VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum, 0) + for _, v := range mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumStringValues Enumerates the set of values in String for VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumStringValues() []string { + return []string{ + "CONFIGURATION_MATCH", + "CONFIGURATION_MISMATCH", + "NOT_MET_SLA", + } +} + +// GetMappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum(val string) (VirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnum, bool) { + enum, ok := mappingVirtualCircuitRedundancyMetadataIpv4bgpSessionRedundancyStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum Enum with underlying type: string +type VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum string + +// Set of constants representing the allowable values for VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum +const ( + VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMatch VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = "CONFIGURATION_MATCH" + VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMismatch VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = "CONFIGURATION_MISMATCH" + VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusNotMetSla VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = "NOT_MET_SLA" +) + +var mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum = map[string]VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum{ + "CONFIGURATION_MATCH": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMatch, + "CONFIGURATION_MISMATCH": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMismatch, + "NOT_MET_SLA": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusNotMetSla, +} + +var mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumLowerCase = map[string]VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum{ + "configuration_match": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMatch, + "configuration_mismatch": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusConfigurationMismatch, + "not_met_sla": VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusNotMetSla, +} + +// GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumValues Enumerates the set of values for VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumValues() []VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum { + values := make([]VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum, 0) + for _, v := range mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum { + values = append(values, v) + } + return values +} + +// GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumStringValues Enumerates the set of values in String for VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum +func GetVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumStringValues() []string { + return []string{ + "CONFIGURATION_MATCH", + "CONFIGURATION_MISMATCH", + "NOT_MET_SLA", + } +} + +// GetMappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum(val string) (VirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnum, bool) { + enum, ok := mappingVirtualCircuitRedundancyMetadataIpv6bgpSessionRedundancyStatusEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go index 55301acaeaa..7a8ef2dce9a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database.go @@ -10,6 +10,7 @@ package database import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -51,6 +52,8 @@ type AutonomousDatabase struct { // KMS key lifecycle details. KmsKeyLifecycleDetails *string `mandatory:"false" json:"kmsKeyLifecycleDetails"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. KmsKeyVersionId *string `mandatory:"false" json:"kmsKeyVersionId"` @@ -92,6 +95,9 @@ type AutonomousDatabase struct { // Key History Entry. KeyHistoryEntry []AutonomousDatabaseKeyHistoryEntry `mandatory:"false" json:"keyHistoryEntry"` + // Key History Entry. + EncryptionKeyHistoryEntry []AutonomousDatabaseEncryptionKeyHistoryEntry `mandatory:"false" json:"encryptionKeyHistoryEntry"` + // The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `ocpuCount` parameter. CpuCoreCount *int `mandatory:"false" json:"cpuCoreCount"` @@ -534,6 +540,396 @@ func (m AutonomousDatabase) ValidateEnumValue() (bool, error) { return false, nil } +// UnmarshalJSON unmarshals from json +func (m *AutonomousDatabase) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + LifecycleDetails *string `json:"lifecycleDetails"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + KmsKeyLifecycleDetails *string `json:"kmsKeyLifecycleDetails"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + KmsKeyVersionId *string `json:"kmsKeyVersionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + InMemoryAreaInGBs *int `json:"inMemoryAreaInGBs"` + NextLongTermBackupTimeStamp *common.SDKTime `json:"nextLongTermBackupTimeStamp"` + LongTermBackupSchedule *LongTermBackUpScheduleDetails `json:"longTermBackupSchedule"` + IsFreeTier *bool `json:"isFreeTier"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + TimeReclamationOfFreeAutonomousDatabase *common.SDKTime `json:"timeReclamationOfFreeAutonomousDatabase"` + TimeDeletionOfFreeAutonomousDatabase *common.SDKTime `json:"timeDeletionOfFreeAutonomousDatabase"` + BackupConfig *AutonomousDatabaseBackupConfig `json:"backupConfig"` + KeyHistoryEntry []AutonomousDatabaseKeyHistoryEntry `json:"keyHistoryEntry"` + EncryptionKeyHistoryEntry []AutonomousDatabaseEncryptionKeyHistoryEntry `json:"encryptionKeyHistoryEntry"` + CpuCoreCount *int `json:"cpuCoreCount"` + LocalAdgAutoFailoverMaxDataLossLimit *int `json:"localAdgAutoFailoverMaxDataLossLimit"` + ComputeModel AutonomousDatabaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + TotalBackupStorageSizeInGBs *float64 `json:"totalBackupStorageSizeInGBs"` + OcpuCount *float32 `json:"ocpuCount"` + ProvisionableCpus []float32 `json:"provisionableCpus"` + MemoryPerOracleComputeUnitInGBs *int `json:"memoryPerOracleComputeUnitInGBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + UsedDataStorageSizeInGBs *int `json:"usedDataStorageSizeInGBs"` + InfrastructureType AutonomousDatabaseInfrastructureTypeEnum `json:"infrastructureType"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + TimeUndeleted *common.SDKTime `json:"timeUndeleted"` + TimeCreated *common.SDKTime `json:"timeCreated"` + DisplayName *string `json:"displayName"` + ServiceConsoleUrl *string `json:"serviceConsoleUrl"` + ConnectionStrings *AutonomousDatabaseConnectionStrings `json:"connectionStrings"` + ConnectionUrls *AutonomousDatabaseConnectionUrls `json:"connectionUrls"` + PublicConnectionUrls *AutonomousDatabaseConnectionUrls `json:"publicConnectionUrls"` + LicenseModel AutonomousDatabaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + UsedDataStorageSizeInTBs *int `json:"usedDataStorageSizeInTBs"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpoint *string `json:"privateEndpoint"` + PublicEndpoint *string `json:"publicEndpoint"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + IsPreview *bool `json:"isPreview"` + DbWorkload AutonomousDatabaseDbWorkloadEnum `json:"dbWorkload"` + IsDevTier *bool `json:"isDevTier"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + ApexDetails *AutonomousDatabaseApex `json:"apexDetails"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + DataSafeStatus AutonomousDatabaseDataSafeStatusEnum `json:"dataSafeStatus"` + OperationsInsightsStatus AutonomousDatabaseOperationsInsightsStatusEnum `json:"operationsInsightsStatus"` + DatabaseManagementStatus AutonomousDatabaseDatabaseManagementStatusEnum `json:"databaseManagementStatus"` + TimeMaintenanceBegin *common.SDKTime `json:"timeMaintenanceBegin"` + TimeMaintenanceEnd *common.SDKTime `json:"timeMaintenanceEnd"` + IsRefreshableClone *bool `json:"isRefreshableClone"` + TimeOfLastRefresh *common.SDKTime `json:"timeOfLastRefresh"` + TimeOfLastRefreshPoint *common.SDKTime `json:"timeOfLastRefreshPoint"` + TimeOfNextRefresh *common.SDKTime `json:"timeOfNextRefresh"` + OpenMode AutonomousDatabaseOpenModeEnum `json:"openMode"` + RefreshableStatus AutonomousDatabaseRefreshableStatusEnum `json:"refreshableStatus"` + RefreshableMode AutonomousDatabaseRefreshableModeEnum `json:"refreshableMode"` + SourceId *string `json:"sourceId"` + PermissionLevel AutonomousDatabasePermissionLevelEnum `json:"permissionLevel"` + TimeOfLastSwitchover *common.SDKTime `json:"timeOfLastSwitchover"` + TimeOfLastFailover *common.SDKTime `json:"timeOfLastFailover"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + FailedDataRecoveryInSeconds *int `json:"failedDataRecoveryInSeconds"` + StandbyDb *AutonomousDatabaseStandbySummary `json:"standbyDb"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + IsRemoteDataGuardEnabled *bool `json:"isRemoteDataGuardEnabled"` + LocalStandbyDb *AutonomousDatabaseStandbySummary `json:"localStandbyDb"` + Role AutonomousDatabaseRoleEnum `json:"role"` + AvailableUpgradeVersions []string `json:"availableUpgradeVersions"` + KeyStoreId *string `json:"keyStoreId"` + KeyStoreWalletName *string `json:"keyStoreWalletName"` + AutoRefreshFrequencyInSeconds *int `json:"autoRefreshFrequencyInSeconds"` + AutoRefreshPointLagInSeconds *int `json:"autoRefreshPointLagInSeconds"` + TimeOfAutoRefreshStart *common.SDKTime `json:"timeOfAutoRefreshStart"` + SupportedRegionsToCloneTo []string `json:"supportedRegionsToCloneTo"` + CustomerContacts []CustomerContact `json:"customerContacts"` + TimeLocalDataGuardEnabled *common.SDKTime `json:"timeLocalDataGuardEnabled"` + DataguardRegionType AutonomousDatabaseDataguardRegionTypeEnum `json:"dataguardRegionType"` + TimeDataGuardRoleChanged *common.SDKTime `json:"timeDataGuardRoleChanged"` + PeerDbIds []string `json:"peerDbIds"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + TimeOfJoiningResourcePool *common.SDKTime `json:"timeOfJoiningResourcePool"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + IsReconnectCloneEnabled *bool `json:"isReconnectCloneEnabled"` + TimeUntilReconnectCloneEnabled *common.SDKTime `json:"timeUntilReconnectCloneEnabled"` + AutonomousMaintenanceScheduleType AutonomousDatabaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + AllocatedStorageSizeInTBs *float64 `json:"allocatedStorageSizeInTBs"` + ActualUsedDataStorageSizeInTBs *float64 `json:"actualUsedDataStorageSizeInTBs"` + DatabaseEdition AutonomousDatabaseDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + LocalDisasterRecoveryType DisasterRecoveryConfigurationDisasterRecoveryTypeEnum `json:"localDisasterRecoveryType"` + DisasterRecoveryRegionType AutonomousDatabaseDisasterRecoveryRegionTypeEnum `json:"disasterRecoveryRegionType"` + TimeDisasterRecoveryRoleChanged *common.SDKTime `json:"timeDisasterRecoveryRoleChanged"` + RemoteDisasterRecoveryConfiguration *DisasterRecoveryConfiguration `json:"remoteDisasterRecoveryConfiguration"` + NetServicesArchitecture AutonomousDatabaseNetServicesArchitectureEnum `json:"netServicesArchitecture"` + AvailabilityDomain *string `json:"availabilityDomain"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + LifecycleState AutonomousDatabaseLifecycleStateEnum `json:"lifecycleState"` + DbName *string `json:"dbName"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.LifecycleDetails = model.LifecycleDetails + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + m.KmsKeyLifecycleDetails = model.KmsKeyLifecycleDetails + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.KmsKeyVersionId = model.KmsKeyVersionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.InMemoryPercentage = model.InMemoryPercentage + + m.InMemoryAreaInGBs = model.InMemoryAreaInGBs + + m.NextLongTermBackupTimeStamp = model.NextLongTermBackupTimeStamp + + m.LongTermBackupSchedule = model.LongTermBackupSchedule + + m.IsFreeTier = model.IsFreeTier + + m.SystemTags = model.SystemTags + + m.TimeReclamationOfFreeAutonomousDatabase = model.TimeReclamationOfFreeAutonomousDatabase + + m.TimeDeletionOfFreeAutonomousDatabase = model.TimeDeletionOfFreeAutonomousDatabase + + m.BackupConfig = model.BackupConfig + + m.KeyHistoryEntry = make([]AutonomousDatabaseKeyHistoryEntry, len(model.KeyHistoryEntry)) + copy(m.KeyHistoryEntry, model.KeyHistoryEntry) + m.EncryptionKeyHistoryEntry = make([]AutonomousDatabaseEncryptionKeyHistoryEntry, len(model.EncryptionKeyHistoryEntry)) + copy(m.EncryptionKeyHistoryEntry, model.EncryptionKeyHistoryEntry) + m.CpuCoreCount = model.CpuCoreCount + + m.LocalAdgAutoFailoverMaxDataLossLimit = model.LocalAdgAutoFailoverMaxDataLossLimit + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.TotalBackupStorageSizeInGBs = model.TotalBackupStorageSizeInGBs + + m.OcpuCount = model.OcpuCount + + m.ProvisionableCpus = make([]float32, len(model.ProvisionableCpus)) + copy(m.ProvisionableCpus, model.ProvisionableCpus) + m.MemoryPerOracleComputeUnitInGBs = model.MemoryPerOracleComputeUnitInGBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.UsedDataStorageSizeInGBs = model.UsedDataStorageSizeInGBs + + m.InfrastructureType = model.InfrastructureType + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.TimeUndeleted = model.TimeUndeleted + + m.TimeCreated = model.TimeCreated + + m.DisplayName = model.DisplayName + + m.ServiceConsoleUrl = model.ServiceConsoleUrl + + m.ConnectionStrings = model.ConnectionStrings + + m.ConnectionUrls = model.ConnectionUrls + + m.PublicConnectionUrls = model.PublicConnectionUrls + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.UsedDataStorageSizeInTBs = model.UsedDataStorageSizeInTBs + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpoint = model.PrivateEndpoint + + m.PublicEndpoint = model.PublicEndpoint + + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.IsPreview = model.IsPreview + + m.DbWorkload = model.DbWorkload + + m.IsDevTier = model.IsDevTier + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.ApexDetails = model.ApexDetails + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.DataSafeStatus = model.DataSafeStatus + + m.OperationsInsightsStatus = model.OperationsInsightsStatus + + m.DatabaseManagementStatus = model.DatabaseManagementStatus + + m.TimeMaintenanceBegin = model.TimeMaintenanceBegin + + m.TimeMaintenanceEnd = model.TimeMaintenanceEnd + + m.IsRefreshableClone = model.IsRefreshableClone + + m.TimeOfLastRefresh = model.TimeOfLastRefresh + + m.TimeOfLastRefreshPoint = model.TimeOfLastRefreshPoint + + m.TimeOfNextRefresh = model.TimeOfNextRefresh + + m.OpenMode = model.OpenMode + + m.RefreshableStatus = model.RefreshableStatus + + m.RefreshableMode = model.RefreshableMode + + m.SourceId = model.SourceId + + m.PermissionLevel = model.PermissionLevel + + m.TimeOfLastSwitchover = model.TimeOfLastSwitchover + + m.TimeOfLastFailover = model.TimeOfLastFailover + + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.FailedDataRecoveryInSeconds = model.FailedDataRecoveryInSeconds + + m.StandbyDb = model.StandbyDb + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.IsRemoteDataGuardEnabled = model.IsRemoteDataGuardEnabled + + m.LocalStandbyDb = model.LocalStandbyDb + + m.Role = model.Role + + m.AvailableUpgradeVersions = make([]string, len(model.AvailableUpgradeVersions)) + copy(m.AvailableUpgradeVersions, model.AvailableUpgradeVersions) + m.KeyStoreId = model.KeyStoreId + + m.KeyStoreWalletName = model.KeyStoreWalletName + + m.AutoRefreshFrequencyInSeconds = model.AutoRefreshFrequencyInSeconds + + m.AutoRefreshPointLagInSeconds = model.AutoRefreshPointLagInSeconds + + m.TimeOfAutoRefreshStart = model.TimeOfAutoRefreshStart + + m.SupportedRegionsToCloneTo = make([]string, len(model.SupportedRegionsToCloneTo)) + copy(m.SupportedRegionsToCloneTo, model.SupportedRegionsToCloneTo) + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.TimeLocalDataGuardEnabled = model.TimeLocalDataGuardEnabled + + m.DataguardRegionType = model.DataguardRegionType + + m.TimeDataGuardRoleChanged = model.TimeDataGuardRoleChanged + + m.PeerDbIds = make([]string, len(model.PeerDbIds)) + copy(m.PeerDbIds, model.PeerDbIds) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.TimeOfJoiningResourcePool = model.TimeOfJoiningResourcePool + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.IsReconnectCloneEnabled = model.IsReconnectCloneEnabled + + m.TimeUntilReconnectCloneEnabled = model.TimeUntilReconnectCloneEnabled + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.AllocatedStorageSizeInTBs = model.AllocatedStorageSizeInTBs + + m.ActualUsedDataStorageSizeInTBs = model.ActualUsedDataStorageSizeInTBs + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.LocalDisasterRecoveryType = model.LocalDisasterRecoveryType + + m.DisasterRecoveryRegionType = model.DisasterRecoveryRegionType + + m.TimeDisasterRecoveryRoleChanged = model.TimeDisasterRecoveryRoleChanged + + m.RemoteDisasterRecoveryConfiguration = model.RemoteDisasterRecoveryConfiguration + + m.NetServicesArchitecture = model.NetServicesArchitecture + + m.AvailabilityDomain = model.AvailabilityDomain + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.LifecycleState = model.LifecycleState + + m.DbName = model.DbName + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + return +} + // AutonomousDatabaseLifecycleStateEnum Enum with underlying type: string type AutonomousDatabaseLifecycleStateEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_details.go new file mode 100644 index 00000000000..84539b1e2ca --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_details.go @@ -0,0 +1,147 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AutonomousDatabaseEncryptionKeyDetails Details of the Autonomous Database encryption key. +type AutonomousDatabaseEncryptionKeyDetails interface { +} + +type autonomousdatabaseencryptionkeydetails struct { + JsonData []byte + Provider string `json:"provider"` +} + +// UnmarshalJSON unmarshals json +func (m *autonomousdatabaseencryptionkeydetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerautonomousdatabaseencryptionkeydetails autonomousdatabaseencryptionkeydetails + s := struct { + Model Unmarshalerautonomousdatabaseencryptionkeydetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Provider = s.Model.Provider + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *autonomousdatabaseencryptionkeydetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Provider { + case "OKV": + mm := OkvKeyDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AZURE": + mm := AzureKeyDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "AWS": + mm := AwsKeyDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "OCI": + mm := OciKeyDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ORACLE_MANAGED": + mm := OracleManagedKeyDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for AutonomousDatabaseEncryptionKeyDetails: %s.", m.Provider) + return *m, nil + } +} + +func (m autonomousdatabaseencryptionkeydetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m autonomousdatabaseencryptionkeydetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AutonomousDatabaseEncryptionKeyDetailsProviderEnum Enum with underlying type: string +type AutonomousDatabaseEncryptionKeyDetailsProviderEnum string + +// Set of constants representing the allowable values for AutonomousDatabaseEncryptionKeyDetailsProviderEnum +const ( + AutonomousDatabaseEncryptionKeyDetailsProviderAws AutonomousDatabaseEncryptionKeyDetailsProviderEnum = "AWS" + AutonomousDatabaseEncryptionKeyDetailsProviderAzure AutonomousDatabaseEncryptionKeyDetailsProviderEnum = "AZURE" + AutonomousDatabaseEncryptionKeyDetailsProviderOci AutonomousDatabaseEncryptionKeyDetailsProviderEnum = "OCI" + AutonomousDatabaseEncryptionKeyDetailsProviderOracleManaged AutonomousDatabaseEncryptionKeyDetailsProviderEnum = "ORACLE_MANAGED" + AutonomousDatabaseEncryptionKeyDetailsProviderOkv AutonomousDatabaseEncryptionKeyDetailsProviderEnum = "OKV" +) + +var mappingAutonomousDatabaseEncryptionKeyDetailsProviderEnum = map[string]AutonomousDatabaseEncryptionKeyDetailsProviderEnum{ + "AWS": AutonomousDatabaseEncryptionKeyDetailsProviderAws, + "AZURE": AutonomousDatabaseEncryptionKeyDetailsProviderAzure, + "OCI": AutonomousDatabaseEncryptionKeyDetailsProviderOci, + "ORACLE_MANAGED": AutonomousDatabaseEncryptionKeyDetailsProviderOracleManaged, + "OKV": AutonomousDatabaseEncryptionKeyDetailsProviderOkv, +} + +var mappingAutonomousDatabaseEncryptionKeyDetailsProviderEnumLowerCase = map[string]AutonomousDatabaseEncryptionKeyDetailsProviderEnum{ + "aws": AutonomousDatabaseEncryptionKeyDetailsProviderAws, + "azure": AutonomousDatabaseEncryptionKeyDetailsProviderAzure, + "oci": AutonomousDatabaseEncryptionKeyDetailsProviderOci, + "oracle_managed": AutonomousDatabaseEncryptionKeyDetailsProviderOracleManaged, + "okv": AutonomousDatabaseEncryptionKeyDetailsProviderOkv, +} + +// GetAutonomousDatabaseEncryptionKeyDetailsProviderEnumValues Enumerates the set of values for AutonomousDatabaseEncryptionKeyDetailsProviderEnum +func GetAutonomousDatabaseEncryptionKeyDetailsProviderEnumValues() []AutonomousDatabaseEncryptionKeyDetailsProviderEnum { + values := make([]AutonomousDatabaseEncryptionKeyDetailsProviderEnum, 0) + for _, v := range mappingAutonomousDatabaseEncryptionKeyDetailsProviderEnum { + values = append(values, v) + } + return values +} + +// GetAutonomousDatabaseEncryptionKeyDetailsProviderEnumStringValues Enumerates the set of values in String for AutonomousDatabaseEncryptionKeyDetailsProviderEnum +func GetAutonomousDatabaseEncryptionKeyDetailsProviderEnumStringValues() []string { + return []string{ + "AWS", + "AZURE", + "OCI", + "ORACLE_MANAGED", + "OKV", + } +} + +// GetMappingAutonomousDatabaseEncryptionKeyDetailsProviderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingAutonomousDatabaseEncryptionKeyDetailsProviderEnum(val string) (AutonomousDatabaseEncryptionKeyDetailsProviderEnum, bool) { + enum, ok := mappingAutonomousDatabaseEncryptionKeyDetailsProviderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_history_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_history_entry.go new file mode 100644 index 00000000000..1918dfb2f52 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_encryption_key_history_entry.go @@ -0,0 +1,68 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AutonomousDatabaseEncryptionKeyHistoryEntry The Autonomous Database encryption key history entry. +type AutonomousDatabaseEncryptionKeyHistoryEntry struct { + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + + // The date and time the encryption key was activated. + TimeActivated *common.SDKTime `mandatory:"false" json:"timeActivated"` +} + +func (m AutonomousDatabaseEncryptionKeyHistoryEntry) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AutonomousDatabaseEncryptionKeyHistoryEntry) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *AutonomousDatabaseEncryptionKeyHistoryEntry) UnmarshalJSON(data []byte) (e error) { + model := struct { + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + TimeActivated *common.SDKTime `json:"timeActivated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.TimeActivated = model.TimeActivated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go index 278e8a24732..d155da96407 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/autonomous_database_summary.go @@ -10,6 +10,7 @@ package database import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -53,6 +54,8 @@ type AutonomousDatabaseSummary struct { // KMS key lifecycle details. KmsKeyLifecycleDetails *string `mandatory:"false" json:"kmsKeyLifecycleDetails"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances. KmsKeyVersionId *string `mandatory:"false" json:"kmsKeyVersionId"` @@ -94,6 +97,9 @@ type AutonomousDatabaseSummary struct { // Key History Entry. KeyHistoryEntry []AutonomousDatabaseKeyHistoryEntry `mandatory:"false" json:"keyHistoryEntry"` + // Key History Entry. + EncryptionKeyHistoryEntry []AutonomousDatabaseEncryptionKeyHistoryEntry `mandatory:"false" json:"encryptionKeyHistoryEntry"` + // The number of CPU cores to be made available to the database. When the ECPU is selected, the value for cpuCoreCount is 0. For Autonomous Database on Dedicated Exadata infrastructure, the maximum number of cores is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes (https://www.oracle.com/pls/topic/lookup?ctx=en/cloud/paas/autonomous-database&id=ATPFG-GUID-B0F033C1-CC5A-42F0-B2E7-3CECFEDA1FD1) for shape details. // **Note:** This parameter cannot be used with the `ocpuCount` parameter. CpuCoreCount *int `mandatory:"false" json:"cpuCoreCount"` @@ -536,6 +542,396 @@ func (m AutonomousDatabaseSummary) ValidateEnumValue() (bool, error) { return false, nil } +// UnmarshalJSON unmarshals from json +func (m *AutonomousDatabaseSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + LifecycleDetails *string `json:"lifecycleDetails"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + KmsKeyLifecycleDetails *string `json:"kmsKeyLifecycleDetails"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + KmsKeyVersionId *string `json:"kmsKeyVersionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + InMemoryAreaInGBs *int `json:"inMemoryAreaInGBs"` + NextLongTermBackupTimeStamp *common.SDKTime `json:"nextLongTermBackupTimeStamp"` + LongTermBackupSchedule *LongTermBackUpScheduleDetails `json:"longTermBackupSchedule"` + IsFreeTier *bool `json:"isFreeTier"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + TimeReclamationOfFreeAutonomousDatabase *common.SDKTime `json:"timeReclamationOfFreeAutonomousDatabase"` + TimeDeletionOfFreeAutonomousDatabase *common.SDKTime `json:"timeDeletionOfFreeAutonomousDatabase"` + BackupConfig *AutonomousDatabaseBackupConfig `json:"backupConfig"` + KeyHistoryEntry []AutonomousDatabaseKeyHistoryEntry `json:"keyHistoryEntry"` + EncryptionKeyHistoryEntry []AutonomousDatabaseEncryptionKeyHistoryEntry `json:"encryptionKeyHistoryEntry"` + CpuCoreCount *int `json:"cpuCoreCount"` + LocalAdgAutoFailoverMaxDataLossLimit *int `json:"localAdgAutoFailoverMaxDataLossLimit"` + ComputeModel AutonomousDatabaseSummaryComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + TotalBackupStorageSizeInGBs *float64 `json:"totalBackupStorageSizeInGBs"` + OcpuCount *float32 `json:"ocpuCount"` + ProvisionableCpus []float32 `json:"provisionableCpus"` + MemoryPerOracleComputeUnitInGBs *int `json:"memoryPerOracleComputeUnitInGBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + UsedDataStorageSizeInGBs *int `json:"usedDataStorageSizeInGBs"` + InfrastructureType AutonomousDatabaseSummaryInfrastructureTypeEnum `json:"infrastructureType"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + TimeUndeleted *common.SDKTime `json:"timeUndeleted"` + TimeCreated *common.SDKTime `json:"timeCreated"` + DisplayName *string `json:"displayName"` + ServiceConsoleUrl *string `json:"serviceConsoleUrl"` + ConnectionStrings *AutonomousDatabaseConnectionStrings `json:"connectionStrings"` + ConnectionUrls *AutonomousDatabaseConnectionUrls `json:"connectionUrls"` + PublicConnectionUrls *AutonomousDatabaseConnectionUrls `json:"publicConnectionUrls"` + LicenseModel AutonomousDatabaseSummaryLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + UsedDataStorageSizeInTBs *int `json:"usedDataStorageSizeInTBs"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpoint *string `json:"privateEndpoint"` + PublicEndpoint *string `json:"publicEndpoint"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + IsPreview *bool `json:"isPreview"` + DbWorkload AutonomousDatabaseSummaryDbWorkloadEnum `json:"dbWorkload"` + IsDevTier *bool `json:"isDevTier"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + ApexDetails *AutonomousDatabaseApex `json:"apexDetails"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + DataSafeStatus AutonomousDatabaseSummaryDataSafeStatusEnum `json:"dataSafeStatus"` + OperationsInsightsStatus AutonomousDatabaseSummaryOperationsInsightsStatusEnum `json:"operationsInsightsStatus"` + DatabaseManagementStatus AutonomousDatabaseSummaryDatabaseManagementStatusEnum `json:"databaseManagementStatus"` + TimeMaintenanceBegin *common.SDKTime `json:"timeMaintenanceBegin"` + TimeMaintenanceEnd *common.SDKTime `json:"timeMaintenanceEnd"` + IsRefreshableClone *bool `json:"isRefreshableClone"` + TimeOfLastRefresh *common.SDKTime `json:"timeOfLastRefresh"` + TimeOfLastRefreshPoint *common.SDKTime `json:"timeOfLastRefreshPoint"` + TimeOfNextRefresh *common.SDKTime `json:"timeOfNextRefresh"` + OpenMode AutonomousDatabaseSummaryOpenModeEnum `json:"openMode"` + RefreshableStatus AutonomousDatabaseSummaryRefreshableStatusEnum `json:"refreshableStatus"` + RefreshableMode AutonomousDatabaseSummaryRefreshableModeEnum `json:"refreshableMode"` + SourceId *string `json:"sourceId"` + PermissionLevel AutonomousDatabaseSummaryPermissionLevelEnum `json:"permissionLevel"` + TimeOfLastSwitchover *common.SDKTime `json:"timeOfLastSwitchover"` + TimeOfLastFailover *common.SDKTime `json:"timeOfLastFailover"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + FailedDataRecoveryInSeconds *int `json:"failedDataRecoveryInSeconds"` + StandbyDb *AutonomousDatabaseStandbySummary `json:"standbyDb"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + IsRemoteDataGuardEnabled *bool `json:"isRemoteDataGuardEnabled"` + LocalStandbyDb *AutonomousDatabaseStandbySummary `json:"localStandbyDb"` + Role AutonomousDatabaseSummaryRoleEnum `json:"role"` + AvailableUpgradeVersions []string `json:"availableUpgradeVersions"` + KeyStoreId *string `json:"keyStoreId"` + KeyStoreWalletName *string `json:"keyStoreWalletName"` + AutoRefreshFrequencyInSeconds *int `json:"autoRefreshFrequencyInSeconds"` + AutoRefreshPointLagInSeconds *int `json:"autoRefreshPointLagInSeconds"` + TimeOfAutoRefreshStart *common.SDKTime `json:"timeOfAutoRefreshStart"` + SupportedRegionsToCloneTo []string `json:"supportedRegionsToCloneTo"` + CustomerContacts []CustomerContact `json:"customerContacts"` + TimeLocalDataGuardEnabled *common.SDKTime `json:"timeLocalDataGuardEnabled"` + DataguardRegionType AutonomousDatabaseSummaryDataguardRegionTypeEnum `json:"dataguardRegionType"` + TimeDataGuardRoleChanged *common.SDKTime `json:"timeDataGuardRoleChanged"` + PeerDbIds []string `json:"peerDbIds"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + TimeOfJoiningResourcePool *common.SDKTime `json:"timeOfJoiningResourcePool"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + IsReconnectCloneEnabled *bool `json:"isReconnectCloneEnabled"` + TimeUntilReconnectCloneEnabled *common.SDKTime `json:"timeUntilReconnectCloneEnabled"` + AutonomousMaintenanceScheduleType AutonomousDatabaseSummaryAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + AllocatedStorageSizeInTBs *float64 `json:"allocatedStorageSizeInTBs"` + ActualUsedDataStorageSizeInTBs *float64 `json:"actualUsedDataStorageSizeInTBs"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + LocalDisasterRecoveryType DisasterRecoveryConfigurationDisasterRecoveryTypeEnum `json:"localDisasterRecoveryType"` + DisasterRecoveryRegionType AutonomousDatabaseSummaryDisasterRecoveryRegionTypeEnum `json:"disasterRecoveryRegionType"` + TimeDisasterRecoveryRoleChanged *common.SDKTime `json:"timeDisasterRecoveryRoleChanged"` + RemoteDisasterRecoveryConfiguration *DisasterRecoveryConfiguration `json:"remoteDisasterRecoveryConfiguration"` + NetServicesArchitecture AutonomousDatabaseSummaryNetServicesArchitectureEnum `json:"netServicesArchitecture"` + AvailabilityDomain *string `json:"availabilityDomain"` + ClusterPlacementGroupId *string `json:"clusterPlacementGroupId"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + LifecycleState AutonomousDatabaseSummaryLifecycleStateEnum `json:"lifecycleState"` + DbName *string `json:"dbName"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.LifecycleDetails = model.LifecycleDetails + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + m.KmsKeyLifecycleDetails = model.KmsKeyLifecycleDetails + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.KmsKeyVersionId = model.KmsKeyVersionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.InMemoryPercentage = model.InMemoryPercentage + + m.InMemoryAreaInGBs = model.InMemoryAreaInGBs + + m.NextLongTermBackupTimeStamp = model.NextLongTermBackupTimeStamp + + m.LongTermBackupSchedule = model.LongTermBackupSchedule + + m.IsFreeTier = model.IsFreeTier + + m.SystemTags = model.SystemTags + + m.TimeReclamationOfFreeAutonomousDatabase = model.TimeReclamationOfFreeAutonomousDatabase + + m.TimeDeletionOfFreeAutonomousDatabase = model.TimeDeletionOfFreeAutonomousDatabase + + m.BackupConfig = model.BackupConfig + + m.KeyHistoryEntry = make([]AutonomousDatabaseKeyHistoryEntry, len(model.KeyHistoryEntry)) + copy(m.KeyHistoryEntry, model.KeyHistoryEntry) + m.EncryptionKeyHistoryEntry = make([]AutonomousDatabaseEncryptionKeyHistoryEntry, len(model.EncryptionKeyHistoryEntry)) + copy(m.EncryptionKeyHistoryEntry, model.EncryptionKeyHistoryEntry) + m.CpuCoreCount = model.CpuCoreCount + + m.LocalAdgAutoFailoverMaxDataLossLimit = model.LocalAdgAutoFailoverMaxDataLossLimit + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.TotalBackupStorageSizeInGBs = model.TotalBackupStorageSizeInGBs + + m.OcpuCount = model.OcpuCount + + m.ProvisionableCpus = make([]float32, len(model.ProvisionableCpus)) + copy(m.ProvisionableCpus, model.ProvisionableCpus) + m.MemoryPerOracleComputeUnitInGBs = model.MemoryPerOracleComputeUnitInGBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.UsedDataStorageSizeInGBs = model.UsedDataStorageSizeInGBs + + m.InfrastructureType = model.InfrastructureType + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.TimeUndeleted = model.TimeUndeleted + + m.TimeCreated = model.TimeCreated + + m.DisplayName = model.DisplayName + + m.ServiceConsoleUrl = model.ServiceConsoleUrl + + m.ConnectionStrings = model.ConnectionStrings + + m.ConnectionUrls = model.ConnectionUrls + + m.PublicConnectionUrls = model.PublicConnectionUrls + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.UsedDataStorageSizeInTBs = model.UsedDataStorageSizeInTBs + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpoint = model.PrivateEndpoint + + m.PublicEndpoint = model.PublicEndpoint + + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.IsPreview = model.IsPreview + + m.DbWorkload = model.DbWorkload + + m.IsDevTier = model.IsDevTier + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.ApexDetails = model.ApexDetails + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.DataSafeStatus = model.DataSafeStatus + + m.OperationsInsightsStatus = model.OperationsInsightsStatus + + m.DatabaseManagementStatus = model.DatabaseManagementStatus + + m.TimeMaintenanceBegin = model.TimeMaintenanceBegin + + m.TimeMaintenanceEnd = model.TimeMaintenanceEnd + + m.IsRefreshableClone = model.IsRefreshableClone + + m.TimeOfLastRefresh = model.TimeOfLastRefresh + + m.TimeOfLastRefreshPoint = model.TimeOfLastRefreshPoint + + m.TimeOfNextRefresh = model.TimeOfNextRefresh + + m.OpenMode = model.OpenMode + + m.RefreshableStatus = model.RefreshableStatus + + m.RefreshableMode = model.RefreshableMode + + m.SourceId = model.SourceId + + m.PermissionLevel = model.PermissionLevel + + m.TimeOfLastSwitchover = model.TimeOfLastSwitchover + + m.TimeOfLastFailover = model.TimeOfLastFailover + + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.FailedDataRecoveryInSeconds = model.FailedDataRecoveryInSeconds + + m.StandbyDb = model.StandbyDb + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.IsRemoteDataGuardEnabled = model.IsRemoteDataGuardEnabled + + m.LocalStandbyDb = model.LocalStandbyDb + + m.Role = model.Role + + m.AvailableUpgradeVersions = make([]string, len(model.AvailableUpgradeVersions)) + copy(m.AvailableUpgradeVersions, model.AvailableUpgradeVersions) + m.KeyStoreId = model.KeyStoreId + + m.KeyStoreWalletName = model.KeyStoreWalletName + + m.AutoRefreshFrequencyInSeconds = model.AutoRefreshFrequencyInSeconds + + m.AutoRefreshPointLagInSeconds = model.AutoRefreshPointLagInSeconds + + m.TimeOfAutoRefreshStart = model.TimeOfAutoRefreshStart + + m.SupportedRegionsToCloneTo = make([]string, len(model.SupportedRegionsToCloneTo)) + copy(m.SupportedRegionsToCloneTo, model.SupportedRegionsToCloneTo) + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.TimeLocalDataGuardEnabled = model.TimeLocalDataGuardEnabled + + m.DataguardRegionType = model.DataguardRegionType + + m.TimeDataGuardRoleChanged = model.TimeDataGuardRoleChanged + + m.PeerDbIds = make([]string, len(model.PeerDbIds)) + copy(m.PeerDbIds, model.PeerDbIds) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.TimeOfJoiningResourcePool = model.TimeOfJoiningResourcePool + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.IsReconnectCloneEnabled = model.IsReconnectCloneEnabled + + m.TimeUntilReconnectCloneEnabled = model.TimeUntilReconnectCloneEnabled + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.AllocatedStorageSizeInTBs = model.AllocatedStorageSizeInTBs + + m.ActualUsedDataStorageSizeInTBs = model.ActualUsedDataStorageSizeInTBs + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.LocalDisasterRecoveryType = model.LocalDisasterRecoveryType + + m.DisasterRecoveryRegionType = model.DisasterRecoveryRegionType + + m.TimeDisasterRecoveryRoleChanged = model.TimeDisasterRecoveryRoleChanged + + m.RemoteDisasterRecoveryConfiguration = model.RemoteDisasterRecoveryConfiguration + + m.NetServicesArchitecture = model.NetServicesArchitecture + + m.AvailabilityDomain = model.AvailabilityDomain + + m.ClusterPlacementGroupId = model.ClusterPlacementGroupId + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.LifecycleState = model.LifecycleState + + m.DbName = model.DbName + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + return +} + // AutonomousDatabaseSummaryLifecycleStateEnum Enum with underlying type: string type AutonomousDatabaseSummaryLifecycleStateEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/aws_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/aws_key_details.go new file mode 100644 index 00000000000..12dab751f59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/aws_key_details.go @@ -0,0 +1,63 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AwsKeyDetails Details for AWS encryption key. +type AwsKeyDetails struct { + + // AWS key service endpoint URI + ServiceEndpointUri *string `mandatory:"true" json:"serviceEndpointUri"` + + // AWS key ARN + KeyArn *string `mandatory:"true" json:"keyArn"` + + // AWS ARN role + ArnRole *string `mandatory:"false" json:"arnRole"` + + // AWS external ID + ExternalId *string `mandatory:"false" json:"externalId"` +} + +func (m AwsKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AwsKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AwsKeyDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAwsKeyDetails AwsKeyDetails + s := struct { + DiscriminatorParam string `json:"provider"` + MarshalTypeAwsKeyDetails + }{ + "AWS", + (MarshalTypeAwsKeyDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/azure_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/azure_key_details.go new file mode 100644 index 00000000000..285c1c0e5b0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/azure_key_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// AzureKeyDetails Details for Azure encryption key. +type AzureKeyDetails struct { + + // Azure vault URI + VaultUri *string `mandatory:"true" json:"vaultUri"` + + // Azure key name + KeyName *string `mandatory:"true" json:"keyName"` +} + +func (m AzureKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m AzureKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m AzureKeyDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeAzureKeyDetails AzureKeyDetails + s := struct { + DiscriminatorParam string `json:"provider"` + MarshalTypeAzureKeyDetails + }{ + "AZURE", + (MarshalTypeAzureKeyDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go index 7efd473816e..5889b5c3f6c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_base.go @@ -97,6 +97,8 @@ type CreateAutonomousDatabaseBase interface { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. GetVaultId() *string + GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). GetAdminPassword() *string @@ -279,6 +281,7 @@ type createautonomousdatabasebase struct { IsFreeTier *bool `mandatory:"false" json:"isFreeTier"` KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `mandatory:"false" json:"encryptionKey"` AdminPassword *string `mandatory:"false" json:"adminPassword"` DisplayName *string `mandatory:"false" json:"displayName"` LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `mandatory:"false" json:"licenseModel,omitempty"` @@ -345,6 +348,7 @@ func (m *createautonomousdatabasebase) UnmarshalJSON(data []byte) error { m.IsFreeTier = s.Model.IsFreeTier m.KmsKeyId = s.Model.KmsKeyId m.VaultId = s.Model.VaultId + m.EncryptionKey = s.Model.EncryptionKey m.AdminPassword = s.Model.AdminPassword m.DisplayName = s.Model.DisplayName m.LicenseModel = s.Model.LicenseModel @@ -511,6 +515,11 @@ func (m createautonomousdatabasebase) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m createautonomousdatabasebase) GetEncryptionKey() autonomousdatabaseencryptionkeydetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m createautonomousdatabasebase) GetAdminPassword() *string { return m.AdminPassword diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go index 825a697fbd8..60196b26027 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_clone_details.go @@ -82,6 +82,8 @@ type CreateAutonomousDatabaseCloneDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -341,6 +343,11 @@ func (m CreateAutonomousDatabaseCloneDetails) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateAutonomousDatabaseCloneDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateAutonomousDatabaseCloneDetails) GetAdminPassword() *string { return m.AdminPassword @@ -564,6 +571,189 @@ func (m CreateAutonomousDatabaseCloneDetails) MarshalJSON() (buff []byte, e erro return json.Marshal(&s) } +// UnmarshalJSON unmarshals from json +func (m *CreateAutonomousDatabaseCloneDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + CompartmentId *string `json:"compartmentId"` + SourceId *string `json:"sourceId"` + CloneType CreateAutonomousDatabaseCloneDetailsCloneTypeEnum `json:"cloneType"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.CompartmentId = model.CompartmentId + + m.SourceId = model.SourceId + + m.CloneType = model.CloneType + + return +} + // CreateAutonomousDatabaseCloneDetailsCloneTypeEnum Enum with underlying type: string type CreateAutonomousDatabaseCloneDetailsCloneTypeEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go index 6528f822aab..f078203e8d8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_details.go @@ -79,6 +79,8 @@ type CreateAutonomousDatabaseDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -335,6 +337,11 @@ func (m CreateAutonomousDatabaseDetails) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateAutonomousDatabaseDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateAutonomousDatabaseDetails) GetAdminPassword() *string { return m.AdminPassword @@ -554,3 +561,180 @@ func (m CreateAutonomousDatabaseDetails) MarshalJSON() (buff []byte, e error) { return json.Marshal(&s) } + +// UnmarshalJSON unmarshals from json +func (m *CreateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.CompartmentId = model.CompartmentId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go index f4eeda1ba62..041d7918dd7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_details.go @@ -82,6 +82,8 @@ type CreateAutonomousDatabaseFromBackupDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -341,6 +343,11 @@ func (m CreateAutonomousDatabaseFromBackupDetails) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateAutonomousDatabaseFromBackupDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateAutonomousDatabaseFromBackupDetails) GetAdminPassword() *string { return m.AdminPassword @@ -564,6 +571,189 @@ func (m CreateAutonomousDatabaseFromBackupDetails) MarshalJSON() (buff []byte, e return json.Marshal(&s) } +// UnmarshalJSON unmarshals from json +func (m *CreateAutonomousDatabaseFromBackupDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + CompartmentId *string `json:"compartmentId"` + AutonomousDatabaseBackupId *string `json:"autonomousDatabaseBackupId"` + CloneType CreateAutonomousDatabaseFromBackupDetailsCloneTypeEnum `json:"cloneType"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.CompartmentId = model.CompartmentId + + m.AutonomousDatabaseBackupId = model.AutonomousDatabaseBackupId + + m.CloneType = model.CloneType + + return +} + // CreateAutonomousDatabaseFromBackupDetailsCloneTypeEnum Enum with underlying type: string type CreateAutonomousDatabaseFromBackupDetailsCloneTypeEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go index cace4f81d82..acd7d4ed27d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_autonomous_database_from_backup_timestamp_details.go @@ -82,6 +82,8 @@ type CreateAutonomousDatabaseFromBackupTimestampDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -347,6 +349,11 @@ func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetVaultId() *string return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateAutonomousDatabaseFromBackupTimestampDetails) GetAdminPassword() *string { return m.AdminPassword @@ -570,6 +577,195 @@ func (m CreateAutonomousDatabaseFromBackupTimestampDetails) MarshalJSON() (buff return json.Marshal(&s) } +// UnmarshalJSON unmarshals from json +func (m *CreateAutonomousDatabaseFromBackupTimestampDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + Timestamp *common.SDKTime `json:"timestamp"` + UseLatestAvailableBackupTimeStamp *bool `json:"useLatestAvailableBackupTimeStamp"` + CompartmentId *string `json:"compartmentId"` + AutonomousDatabaseId *string `json:"autonomousDatabaseId"` + CloneType CreateAutonomousDatabaseFromBackupTimestampDetailsCloneTypeEnum `json:"cloneType"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.Timestamp = model.Timestamp + + m.UseLatestAvailableBackupTimeStamp = model.UseLatestAvailableBackupTimeStamp + + m.CompartmentId = model.CompartmentId + + m.AutonomousDatabaseId = model.AutonomousDatabaseId + + m.CloneType = model.CloneType + + return +} + // CreateAutonomousDatabaseFromBackupTimestampDetailsCloneTypeEnum Enum with underlying type: string type CreateAutonomousDatabaseFromBackupTimestampDetailsCloneTypeEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go index 0490f64b4e7..c3f8fd869e3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_autonomous_database_data_guard_details.go @@ -101,6 +101,8 @@ type CreateCrossRegionAutonomousDatabaseDataGuardDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -357,6 +359,11 @@ func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetVaultId() *strin return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) GetAdminPassword() *string { return m.AdminPassword @@ -576,3 +583,183 @@ func (m CreateCrossRegionAutonomousDatabaseDataGuardDetails) MarshalJSON() (buff return json.Marshal(&s) } + +// UnmarshalJSON unmarshals from json +func (m *CreateCrossRegionAutonomousDatabaseDataGuardDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + CompartmentId *string `json:"compartmentId"` + SourceId *string `json:"sourceId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.CompartmentId = model.CompartmentId + + m.SourceId = model.SourceId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go index 7e12dd6cc38..2f63588b30f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_region_disaster_recovery_details.go @@ -103,6 +103,8 @@ type CreateCrossRegionDisasterRecoveryDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -367,6 +369,11 @@ func (m CreateCrossRegionDisasterRecoveryDetails) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateCrossRegionDisasterRecoveryDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateCrossRegionDisasterRecoveryDetails) GetAdminPassword() *string { return m.AdminPassword @@ -589,3 +596,189 @@ func (m CreateCrossRegionDisasterRecoveryDetails) MarshalJSON() (buff []byte, e return json.Marshal(&s) } + +// UnmarshalJSON unmarshals from json +func (m *CreateCrossRegionDisasterRecoveryDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + IsReplicateAutomaticBackups *bool `json:"isReplicateAutomaticBackups"` + CompartmentId *string `json:"compartmentId"` + SourceId *string `json:"sourceId"` + RemoteDisasterRecoveryType DisasterRecoveryConfigurationDisasterRecoveryTypeEnum `json:"remoteDisasterRecoveryType"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.IsReplicateAutomaticBackups = model.IsReplicateAutomaticBackups + + m.CompartmentId = model.CompartmentId + + m.SourceId = model.SourceId + + m.RemoteDisasterRecoveryType = model.RemoteDisasterRecoveryType + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go index 159ddf1844c..36d8b30a715 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_cross_tenancy_disaster_recovery_details.go @@ -104,6 +104,8 @@ type CreateCrossTenancyDisasterRecoveryDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -368,6 +370,11 @@ func (m CreateCrossTenancyDisasterRecoveryDetails) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateCrossTenancyDisasterRecoveryDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateCrossTenancyDisasterRecoveryDetails) GetAdminPassword() *string { return m.AdminPassword @@ -590,3 +597,189 @@ func (m CreateCrossTenancyDisasterRecoveryDetails) MarshalJSON() (buff []byte, e return json.Marshal(&s) } + +// UnmarshalJSON unmarshals from json +func (m *CreateCrossTenancyDisasterRecoveryDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + IsReplicateAutomaticBackups *bool `json:"isReplicateAutomaticBackups"` + CompartmentId *string `json:"compartmentId"` + SourceId *string `json:"sourceId"` + DisasterRecoveryType DisasterRecoveryConfigurationDisasterRecoveryTypeEnum `json:"disasterRecoveryType"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.IsReplicateAutomaticBackups = model.IsReplicateAutomaticBackups + + m.CompartmentId = model.CompartmentId + + m.SourceId = model.SourceId + + m.DisasterRecoveryType = model.DisasterRecoveryType + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go index 569f506e945..d4638ba78c5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/create_refreshable_autonomous_database_clone_details.go @@ -82,6 +82,8 @@ type CreateRefreshableAutonomousDatabaseCloneDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -354,6 +356,11 @@ func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m CreateRefreshableAutonomousDatabaseCloneDetails) GetAdminPassword() *string { return m.AdminPassword @@ -580,6 +587,201 @@ func (m CreateRefreshableAutonomousDatabaseCloneDetails) MarshalJSON() (buff []b return json.Marshal(&s) } +// UnmarshalJSON unmarshals from json +func (m *CreateRefreshableAutonomousDatabaseCloneDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + RefreshableMode CreateRefreshableAutonomousDatabaseCloneDetailsRefreshableModeEnum `json:"refreshableMode"` + AutoRefreshFrequencyInSeconds *int `json:"autoRefreshFrequencyInSeconds"` + AutoRefreshPointLagInSeconds *int `json:"autoRefreshPointLagInSeconds"` + TimeOfAutoRefreshStart *common.SDKTime `json:"timeOfAutoRefreshStart"` + OpenMode CreateRefreshableAutonomousDatabaseCloneDetailsOpenModeEnum `json:"openMode"` + CompartmentId *string `json:"compartmentId"` + SourceId *string `json:"sourceId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.RefreshableMode = model.RefreshableMode + + m.AutoRefreshFrequencyInSeconds = model.AutoRefreshFrequencyInSeconds + + m.AutoRefreshPointLagInSeconds = model.AutoRefreshPointLagInSeconds + + m.TimeOfAutoRefreshStart = model.TimeOfAutoRefreshStart + + m.OpenMode = model.OpenMode + + m.CompartmentId = model.CompartmentId + + m.SourceId = model.SourceId + + return +} + // CreateRefreshableAutonomousDatabaseCloneDetailsRefreshableModeEnum Enum with underlying type: string type CreateRefreshableAutonomousDatabaseCloneDetailsRefreshableModeEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/oci_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/oci_key_details.go new file mode 100644 index 00000000000..940b9c5d116 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/oci_key_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OciKeyDetails Details for OCI encryption key. +type OciKeyDetails struct { + + // The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations. + KmsKeyId *string `mandatory:"true" json:"kmsKeyId"` + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. + VaultId *string `mandatory:"true" json:"vaultId"` +} + +func (m OciKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OciKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m OciKeyDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeOciKeyDetails OciKeyDetails + s := struct { + DiscriminatorParam string `json:"provider"` + MarshalTypeOciKeyDetails + }{ + "OCI", + (MarshalTypeOciKeyDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/okv_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/okv_key_details.go new file mode 100644 index 00000000000..33fcfcc6f64 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/okv_key_details.go @@ -0,0 +1,66 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OkvKeyDetails Details for OKV encryption key. +type OkvKeyDetails struct { + + // URI of OKV server + OkvUri *string `mandatory:"true" json:"okvUri"` + + // UUID of OKV KMS Key + OkvKmsKey *string `mandatory:"true" json:"okvKmsKey"` + + // OKV wallet directory name + DirectoryName *string `mandatory:"true" json:"directoryName"` + + // OKV certificate directory name + CertificateDirectoryName *string `mandatory:"true" json:"certificateDirectoryName"` + + // OKV certificate id + CertificateId *string `mandatory:"false" json:"certificateId"` +} + +func (m OkvKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OkvKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m OkvKeyDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeOkvKeyDetails OkvKeyDetails + s := struct { + DiscriminatorParam string `json:"provider"` + MarshalTypeOkvKeyDetails + }{ + "OKV", + (MarshalTypeOkvKeyDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/oracle_managed_key_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/oracle_managed_key_details.go new file mode 100644 index 00000000000..0c602809423 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/oracle_managed_key_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Database Service API +// +// The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see Overview of the Database Service (https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/databaseoverview.htm). +// + +package database + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// OracleManagedKeyDetails Details for Oracle-managed encryption key. +type OracleManagedKeyDetails struct { +} + +func (m OracleManagedKeyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m OracleManagedKeyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m OracleManagedKeyDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeOracleManagedKeyDetails OracleManagedKeyDetails + s := struct { + DiscriminatorParam string `json:"provider"` + MarshalTypeOracleManagedKeyDetails + }{ + "ORACLE_MANAGED", + (MarshalTypeOracleManagedKeyDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go index cdd4f58af0b..ea58ddfe868 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/undelete_autonomous_database_details.go @@ -82,6 +82,8 @@ type UndeleteAutonomousDatabaseDetails struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the Oracle Cloud Infrastructure vault (https://docs.cloud.oracle.com/Content/KeyManagement/Concepts/keyoverview.htm#concepts). This parameter and `secretId` are required for Customer Managed Keys. VaultId *string `mandatory:"false" json:"vaultId"` + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` + // **Important** The `adminPassword` or `secretId` must be specified for all Autonomous Databases except for refreshable clones. The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. // This cannot be used in conjunction with with OCI vault secrets (secretId). AdminPassword *string `mandatory:"false" json:"adminPassword"` @@ -338,6 +340,11 @@ func (m UndeleteAutonomousDatabaseDetails) GetVaultId() *string { return m.VaultId } +// GetEncryptionKey returns EncryptionKey +func (m UndeleteAutonomousDatabaseDetails) GetEncryptionKey() AutonomousDatabaseEncryptionKeyDetails { + return m.EncryptionKey +} + // GetAdminPassword returns AdminPassword func (m UndeleteAutonomousDatabaseDetails) GetAdminPassword() *string { return m.AdminPassword @@ -557,3 +564,183 @@ func (m UndeleteAutonomousDatabaseDetails) MarshalJSON() (buff []byte, e error) return json.Marshal(&s) } + +// UnmarshalJSON unmarshals from json +func (m *UndeleteAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubscriptionId *string `json:"subscriptionId"` + CharacterSet *string `json:"characterSet"` + NcharacterSet *string `json:"ncharacterSet"` + DbName *string `json:"dbName"` + CpuCoreCount *int `json:"cpuCoreCount"` + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel CreateAutonomousDatabaseBaseComputeModelEnum `json:"computeModel"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DbWorkload CreateAutonomousDatabaseBaseDbWorkloadEnum `json:"dbWorkload"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + IsFreeTier *bool `json:"isFreeTier"` + KmsKeyId *string `json:"kmsKeyId"` + VaultId *string `json:"vaultId"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + AdminPassword *string `json:"adminPassword"` + DisplayName *string `json:"displayName"` + LicenseModel CreateAutonomousDatabaseBaseLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsPreviewVersionWithServiceTermsAccepted *bool `json:"isPreviewVersionWithServiceTermsAccepted"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsDevTier *bool `json:"isDevTier"` + IsDedicated *bool `json:"isDedicated"` + AutonomousContainerDatabaseId *string `json:"autonomousContainerDatabaseId"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + SubnetId *string `json:"subnetId"` + NsgIds []string `json:"nsgIds"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + DbVersion *string `json:"dbVersion"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + AutonomousMaintenanceScheduleType CreateAutonomousDatabaseBaseAutonomousMaintenanceScheduleTypeEnum `json:"autonomousMaintenanceScheduleType"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + CompartmentId *string `json:"compartmentId"` + SourceId *string `json:"sourceId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.SubscriptionId = model.SubscriptionId + + m.CharacterSet = model.CharacterSet + + m.NcharacterSet = model.NcharacterSet + + m.DbName = model.DbName + + m.CpuCoreCount = model.CpuCoreCount + + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DbWorkload = model.DbWorkload + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.IsFreeTier = model.IsFreeTier + + m.KmsKeyId = model.KmsKeyId + + m.VaultId = model.VaultId + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + m.AdminPassword = model.AdminPassword + + m.DisplayName = model.DisplayName + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsPreviewVersionWithServiceTermsAccepted = model.IsPreviewVersionWithServiceTermsAccepted + + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsDevTier = model.IsDevTier + + m.IsDedicated = model.IsDedicated + + m.AutonomousContainerDatabaseId = model.AutonomousContainerDatabaseId + + m.InMemoryPercentage = model.InMemoryPercentage + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.SubnetId = model.SubnetId + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.DbVersion = model.DbVersion + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.AutonomousMaintenanceScheduleType = model.AutonomousMaintenanceScheduleType + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + m.CompartmentId = model.CompartmentId + + m.SourceId = model.SourceId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go index 8927ff284a3..6226e673e64 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/database/update_autonomous_database_details.go @@ -10,6 +10,7 @@ package database import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" @@ -271,6 +272,8 @@ type UpdateAutonomousDatabaseDetails struct { // The version of the vault secret. If no version is specified, the latest version will be used. SecretVersionNumber *int `mandatory:"false" json:"secretVersionNumber"` + + EncryptionKey AutonomousDatabaseEncryptionKeyDetails `mandatory:"false" json:"encryptionKey"` } func (m UpdateAutonomousDatabaseDetails) String() string { @@ -310,6 +313,183 @@ func (m UpdateAutonomousDatabaseDetails) ValidateEnumValue() (bool, error) { return false, nil } +// UnmarshalJSON unmarshals from json +func (m *UpdateAutonomousDatabaseDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + BackupRetentionPeriodInDays *int `json:"backupRetentionPeriodInDays"` + ComputeModel UpdateAutonomousDatabaseDetailsComputeModelEnum `json:"computeModel"` + InMemoryPercentage *int `json:"inMemoryPercentage"` + LocalAdgAutoFailoverMaxDataLossLimit *int `json:"localAdgAutoFailoverMaxDataLossLimit"` + CpuCoreCount *int `json:"cpuCoreCount"` + LongTermBackupSchedule *LongTermBackUpScheduleDetails `json:"longTermBackupSchedule"` + IsDevTier *bool `json:"isDevTier"` + ComputeCount *float32 `json:"computeCount"` + OcpuCount *float32 `json:"ocpuCount"` + DataStorageSizeInTBs *int `json:"dataStorageSizeInTBs"` + DataStorageSizeInGBs *int `json:"dataStorageSizeInGBs"` + DisplayName *string `json:"displayName"` + IsFreeTier *bool `json:"isFreeTier"` + AdminPassword *string `json:"adminPassword"` + DbName *string `json:"dbName"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SecurityAttributes map[string]map[string]interface{} `json:"securityAttributes"` + DbWorkload UpdateAutonomousDatabaseDetailsDbWorkloadEnum `json:"dbWorkload"` + LicenseModel UpdateAutonomousDatabaseDetailsLicenseModelEnum `json:"licenseModel"` + ByolComputeCountLimit *float32 `json:"byolComputeCountLimit"` + IsAccessControlEnabled *bool `json:"isAccessControlEnabled"` + WhitelistedIps []string `json:"whitelistedIps"` + ArePrimaryWhitelistedIpsUsed *bool `json:"arePrimaryWhitelistedIpsUsed"` + StandbyWhitelistedIps []string `json:"standbyWhitelistedIps"` + IsAutoScalingEnabled *bool `json:"isAutoScalingEnabled"` + IsRefreshableClone *bool `json:"isRefreshableClone"` + RefreshableMode UpdateAutonomousDatabaseDetailsRefreshableModeEnum `json:"refreshableMode"` + IsLocalDataGuardEnabled *bool `json:"isLocalDataGuardEnabled"` + IsDataGuardEnabled *bool `json:"isDataGuardEnabled"` + PeerDbId *string `json:"peerDbId"` + DbVersion *string `json:"dbVersion"` + OpenMode UpdateAutonomousDatabaseDetailsOpenModeEnum `json:"openMode"` + PermissionLevel UpdateAutonomousDatabaseDetailsPermissionLevelEnum `json:"permissionLevel"` + SubnetId *string `json:"subnetId"` + PrivateEndpointLabel *string `json:"privateEndpointLabel"` + PrivateEndpointIp *string `json:"privateEndpointIp"` + NsgIds []string `json:"nsgIds"` + AutoRefreshFrequencyInSeconds *int `json:"autoRefreshFrequencyInSeconds"` + AutoRefreshPointLagInSeconds *int `json:"autoRefreshPointLagInSeconds"` + TimeOfAutoRefreshStart *common.SDKTime `json:"timeOfAutoRefreshStart"` + CustomerContacts []CustomerContact `json:"customerContacts"` + IsMtlsConnectionRequired *bool `json:"isMtlsConnectionRequired"` + ResourcePoolLeaderId *string `json:"resourcePoolLeaderId"` + ResourcePoolSummary *ResourcePoolSummary `json:"resourcePoolSummary"` + ScheduledOperations []ScheduledOperationDetails `json:"scheduledOperations"` + IsAutoScalingForStorageEnabled *bool `json:"isAutoScalingForStorageEnabled"` + DatabaseEdition AutonomousDatabaseSummaryDatabaseEditionEnum `json:"databaseEdition"` + DbToolsDetails []DatabaseTool `json:"dbToolsDetails"` + SecretId *string `json:"secretId"` + SecretVersionNumber *int `json:"secretVersionNumber"` + EncryptionKey autonomousdatabaseencryptionkeydetails `json:"encryptionKey"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.BackupRetentionPeriodInDays = model.BackupRetentionPeriodInDays + + m.ComputeModel = model.ComputeModel + + m.InMemoryPercentage = model.InMemoryPercentage + + m.LocalAdgAutoFailoverMaxDataLossLimit = model.LocalAdgAutoFailoverMaxDataLossLimit + + m.CpuCoreCount = model.CpuCoreCount + + m.LongTermBackupSchedule = model.LongTermBackupSchedule + + m.IsDevTier = model.IsDevTier + + m.ComputeCount = model.ComputeCount + + m.OcpuCount = model.OcpuCount + + m.DataStorageSizeInTBs = model.DataStorageSizeInTBs + + m.DataStorageSizeInGBs = model.DataStorageSizeInGBs + + m.DisplayName = model.DisplayName + + m.IsFreeTier = model.IsFreeTier + + m.AdminPassword = model.AdminPassword + + m.DbName = model.DbName + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SecurityAttributes = model.SecurityAttributes + + m.DbWorkload = model.DbWorkload + + m.LicenseModel = model.LicenseModel + + m.ByolComputeCountLimit = model.ByolComputeCountLimit + + m.IsAccessControlEnabled = model.IsAccessControlEnabled + + m.WhitelistedIps = make([]string, len(model.WhitelistedIps)) + copy(m.WhitelistedIps, model.WhitelistedIps) + m.ArePrimaryWhitelistedIpsUsed = model.ArePrimaryWhitelistedIpsUsed + + m.StandbyWhitelistedIps = make([]string, len(model.StandbyWhitelistedIps)) + copy(m.StandbyWhitelistedIps, model.StandbyWhitelistedIps) + m.IsAutoScalingEnabled = model.IsAutoScalingEnabled + + m.IsRefreshableClone = model.IsRefreshableClone + + m.RefreshableMode = model.RefreshableMode + + m.IsLocalDataGuardEnabled = model.IsLocalDataGuardEnabled + + m.IsDataGuardEnabled = model.IsDataGuardEnabled + + m.PeerDbId = model.PeerDbId + + m.DbVersion = model.DbVersion + + m.OpenMode = model.OpenMode + + m.PermissionLevel = model.PermissionLevel + + m.SubnetId = model.SubnetId + + m.PrivateEndpointLabel = model.PrivateEndpointLabel + + m.PrivateEndpointIp = model.PrivateEndpointIp + + m.NsgIds = make([]string, len(model.NsgIds)) + copy(m.NsgIds, model.NsgIds) + m.AutoRefreshFrequencyInSeconds = model.AutoRefreshFrequencyInSeconds + + m.AutoRefreshPointLagInSeconds = model.AutoRefreshPointLagInSeconds + + m.TimeOfAutoRefreshStart = model.TimeOfAutoRefreshStart + + m.CustomerContacts = make([]CustomerContact, len(model.CustomerContacts)) + copy(m.CustomerContacts, model.CustomerContacts) + m.IsMtlsConnectionRequired = model.IsMtlsConnectionRequired + + m.ResourcePoolLeaderId = model.ResourcePoolLeaderId + + m.ResourcePoolSummary = model.ResourcePoolSummary + + m.ScheduledOperations = make([]ScheduledOperationDetails, len(model.ScheduledOperations)) + copy(m.ScheduledOperations, model.ScheduledOperations) + m.IsAutoScalingForStorageEnabled = model.IsAutoScalingForStorageEnabled + + m.DatabaseEdition = model.DatabaseEdition + + m.DbToolsDetails = make([]DatabaseTool, len(model.DbToolsDetails)) + copy(m.DbToolsDetails, model.DbToolsDetails) + m.SecretId = model.SecretId + + m.SecretVersionNumber = model.SecretVersionNumber + + nn, e = model.EncryptionKey.UnmarshalPolymorphicJSON(model.EncryptionKey.JsonData) + if e != nil { + return + } + if nn != nil { + m.EncryptionKey = nn.(AutonomousDatabaseEncryptionKeyDetails) + } else { + m.EncryptionKey = nil + } + + return +} + // UpdateAutonomousDatabaseDetailsComputeModelEnum Enum with underlying type: string type UpdateAutonomousDatabaseDetailsComputeModelEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_operation_details.go new file mode 100644 index 00000000000..ab5d4b59897 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_operation_details.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Data Science API +// +// Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see Data Science (https://docs.oracle.com/iaas/data-science/using/data-science.htm). +// + +package datascience + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BackupOperationDetails Backup operation details of the model. +type BackupOperationDetails struct { + + // The backup status of the model. + BackupState ModelSettingActionStateEnum `mandatory:"true" json:"backupState"` + + // The backup execution status details of the model. + BackupStateDetails *string `mandatory:"true" json:"backupStateDetails"` + + // The last backup execution time of the model. + TimeLastBackup *common.SDKTime `mandatory:"false" json:"timeLastBackup"` +} + +func (m BackupOperationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BackupOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingModelSettingActionStateEnum(string(m.BackupState)); !ok && m.BackupState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for BackupState: %s. Supported values are: %s.", m.BackupState, strings.Join(GetModelSettingActionStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_setting.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_setting.go new file mode 100644 index 00000000000..6c1a1356c8f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/backup_setting.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Data Science API +// +// Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see Data Science (https://docs.oracle.com/iaas/data-science/using/data-science.htm). +// + +package datascience + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// BackupSetting Back up setting details of the model. +type BackupSetting struct { + + // Boolean flag representing whether backup needs to be enabled/disabled for the model. + IsBackupEnabled *bool `mandatory:"true" json:"isBackupEnabled"` + + // OCI backup region for the model. + BackupRegion *string `mandatory:"true" json:"backupRegion"` + + // Customer notification on backup success/failure events. + CustomerNotificationType ModelSettingCustomerNotificationTypeEnum `mandatory:"false" json:"customerNotificationType,omitempty"` +} + +func (m BackupSetting) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m BackupSetting) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingModelSettingCustomerNotificationTypeEnum(string(m.CustomerNotificationType)); !ok && m.CustomerNotificationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CustomerNotificationType: %s. Supported values are: %s.", m.CustomerNotificationType, strings.Join(GetModelSettingCustomerNotificationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_model_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_model_details.go index 5a5f6d1dd30..cfa349c3809 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_model_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/create_model_details.go @@ -56,6 +56,10 @@ type CreateModelDetails struct { // The version label can add an additional description of the lifecycle state of the model or the application using/training the model. VersionLabel *string `mandatory:"false" json:"versionLabel"` + + RetentionSetting *RetentionSetting `mandatory:"false" json:"retentionSetting"` + + BackupSetting *BackupSetting `mandatory:"false" json:"backupSetting"` } func (m CreateModelDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/datascience_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/datascience_client.go index 97240f17487..fe51587d342 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/datascience_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/datascience_client.go @@ -4858,6 +4858,69 @@ func (client DataScienceClient) listWorkRequests(ctx context.Context, request co return response, err } +// RestoreArchivedModelArtifact Restore archived model artifact +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datascience/RestoreArchivedModelArtifact.go.html to see an example of how to use RestoreArchivedModelArtifact API. +// A default retry strategy applies to this operation RestoreArchivedModelArtifact() +func (client DataScienceClient) RestoreArchivedModelArtifact(ctx context.Context, request RestoreArchivedModelArtifactRequest) (response RestoreArchivedModelArtifactResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.restoreArchivedModelArtifact, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = RestoreArchivedModelArtifactResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = RestoreArchivedModelArtifactResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(RestoreArchivedModelArtifactResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into RestoreArchivedModelArtifactResponse") + } + return +} + +// restoreArchivedModelArtifact implements the OCIOperation interface (enables retrying operations) +func (client DataScienceClient) restoreArchivedModelArtifact(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/models/{modelId}/actions/restore", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response RestoreArchivedModelArtifactResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/data-science/20190101/Model/RestoreArchivedModelArtifact" + err = common.PostProcessServiceError(err, "DataScience", "RestoreArchivedModelArtifact", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // UpdateDataSciencePrivateEndpoint Updates a private endpoint using a `privateEndpointId`. If changes to a private endpoint match // a previously defined private endpoint, then a 409 status code is returned. This indicates // that a conflict has been detected. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_work_requests_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_work_requests_request_response.go index a1e1dd9dbf6..2f86f26a1c9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_work_requests_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/list_work_requests_request_response.go @@ -163,6 +163,7 @@ const ( ListWorkRequestsOperationTypePrivateEndpointDelete ListWorkRequestsOperationTypeEnum = "PRIVATE_ENDPOINT_DELETE" ListWorkRequestsOperationTypePrivateEndpointMove ListWorkRequestsOperationTypeEnum = "PRIVATE_ENDPOINT_MOVE" ListWorkRequestsOperationTypePrivateEndpointUpdate ListWorkRequestsOperationTypeEnum = "PRIVATE_ENDPOINT_UPDATE" + ListWorkRequestsOperationTypeRestoreArchivedModel ListWorkRequestsOperationTypeEnum = "RESTORE_ARCHIVED_MODEL" ) var mappingListWorkRequestsOperationTypeEnum = map[string]ListWorkRequestsOperationTypeEnum{ @@ -190,6 +191,7 @@ var mappingListWorkRequestsOperationTypeEnum = map[string]ListWorkRequestsOperat "PRIVATE_ENDPOINT_DELETE": ListWorkRequestsOperationTypePrivateEndpointDelete, "PRIVATE_ENDPOINT_MOVE": ListWorkRequestsOperationTypePrivateEndpointMove, "PRIVATE_ENDPOINT_UPDATE": ListWorkRequestsOperationTypePrivateEndpointUpdate, + "RESTORE_ARCHIVED_MODEL": ListWorkRequestsOperationTypeRestoreArchivedModel, } var mappingListWorkRequestsOperationTypeEnumLowerCase = map[string]ListWorkRequestsOperationTypeEnum{ @@ -217,6 +219,7 @@ var mappingListWorkRequestsOperationTypeEnumLowerCase = map[string]ListWorkReque "private_endpoint_delete": ListWorkRequestsOperationTypePrivateEndpointDelete, "private_endpoint_move": ListWorkRequestsOperationTypePrivateEndpointMove, "private_endpoint_update": ListWorkRequestsOperationTypePrivateEndpointUpdate, + "restore_archived_model": ListWorkRequestsOperationTypeRestoreArchivedModel, } // GetListWorkRequestsOperationTypeEnumValues Enumerates the set of values for ListWorkRequestsOperationTypeEnum @@ -255,6 +258,7 @@ func GetListWorkRequestsOperationTypeEnumStringValues() []string { "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", + "RESTORE_ARCHIVED_MODEL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model.go index eba9cd5b569..e3b1a84c3bf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model.go @@ -33,6 +33,9 @@ type Model struct { // The state of the model. LifecycleState ModelLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + // Details about the lifecycle state of the model. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` + // The date and time the resource was created in the timestamp format defined by RFC3339 (https://tools.ietf.org/html/rfc3339). // Example: 2019-08-25T21:10:29.41Z TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` @@ -52,6 +55,14 @@ type Model struct { // The version label can add an additional description of the lifecycle state of the model or the application using and training the model. VersionLabel *string `mandatory:"true" json:"versionLabel"` + RetentionSetting *RetentionSetting `mandatory:"true" json:"retentionSetting"` + + BackupSetting *BackupSetting `mandatory:"true" json:"backupSetting"` + + RetentionOperationDetails *RetentionOperationDetails `mandatory:"true" json:"retentionOperationDetails"` + + BackupOperationDetails *BackupOperationDetails `mandatory:"true" json:"backupOperationDetails"` + // A short description of the model. Description *string `mandatory:"false" json:"description"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_action_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_action_state.go new file mode 100644 index 00000000000..46613fce7d1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_action_state.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Data Science API +// +// Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see Data Science (https://docs.oracle.com/iaas/data-science/using/data-science.htm). +// + +package datascience + +import ( + "strings" +) + +// ModelSettingActionStateEnum Enum with underlying type: string +type ModelSettingActionStateEnum string + +// Set of constants representing the allowable values for ModelSettingActionStateEnum +const ( + ModelSettingActionStatePending ModelSettingActionStateEnum = "PENDING" + ModelSettingActionStateFailed ModelSettingActionStateEnum = "FAILED" + ModelSettingActionStateSucceeded ModelSettingActionStateEnum = "SUCCEEDED" +) + +var mappingModelSettingActionStateEnum = map[string]ModelSettingActionStateEnum{ + "PENDING": ModelSettingActionStatePending, + "FAILED": ModelSettingActionStateFailed, + "SUCCEEDED": ModelSettingActionStateSucceeded, +} + +var mappingModelSettingActionStateEnumLowerCase = map[string]ModelSettingActionStateEnum{ + "pending": ModelSettingActionStatePending, + "failed": ModelSettingActionStateFailed, + "succeeded": ModelSettingActionStateSucceeded, +} + +// GetModelSettingActionStateEnumValues Enumerates the set of values for ModelSettingActionStateEnum +func GetModelSettingActionStateEnumValues() []ModelSettingActionStateEnum { + values := make([]ModelSettingActionStateEnum, 0) + for _, v := range mappingModelSettingActionStateEnum { + values = append(values, v) + } + return values +} + +// GetModelSettingActionStateEnumStringValues Enumerates the set of values in String for ModelSettingActionStateEnum +func GetModelSettingActionStateEnumStringValues() []string { + return []string{ + "PENDING", + "FAILED", + "SUCCEEDED", + } +} + +// GetMappingModelSettingActionStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingModelSettingActionStateEnum(val string) (ModelSettingActionStateEnum, bool) { + enum, ok := mappingModelSettingActionStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_customer_notification_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_customer_notification_type.go new file mode 100644 index 00000000000..e2b714da50c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_setting_customer_notification_type.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Data Science API +// +// Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see Data Science (https://docs.oracle.com/iaas/data-science/using/data-science.htm). +// + +package datascience + +import ( + "strings" +) + +// ModelSettingCustomerNotificationTypeEnum Enum with underlying type: string +type ModelSettingCustomerNotificationTypeEnum string + +// Set of constants representing the allowable values for ModelSettingCustomerNotificationTypeEnum +const ( + ModelSettingCustomerNotificationTypeNone ModelSettingCustomerNotificationTypeEnum = "NONE" + ModelSettingCustomerNotificationTypeAll ModelSettingCustomerNotificationTypeEnum = "ALL" + ModelSettingCustomerNotificationTypeOnFailure ModelSettingCustomerNotificationTypeEnum = "ON_FAILURE" + ModelSettingCustomerNotificationTypeOnSuccess ModelSettingCustomerNotificationTypeEnum = "ON_SUCCESS" +) + +var mappingModelSettingCustomerNotificationTypeEnum = map[string]ModelSettingCustomerNotificationTypeEnum{ + "NONE": ModelSettingCustomerNotificationTypeNone, + "ALL": ModelSettingCustomerNotificationTypeAll, + "ON_FAILURE": ModelSettingCustomerNotificationTypeOnFailure, + "ON_SUCCESS": ModelSettingCustomerNotificationTypeOnSuccess, +} + +var mappingModelSettingCustomerNotificationTypeEnumLowerCase = map[string]ModelSettingCustomerNotificationTypeEnum{ + "none": ModelSettingCustomerNotificationTypeNone, + "all": ModelSettingCustomerNotificationTypeAll, + "on_failure": ModelSettingCustomerNotificationTypeOnFailure, + "on_success": ModelSettingCustomerNotificationTypeOnSuccess, +} + +// GetModelSettingCustomerNotificationTypeEnumValues Enumerates the set of values for ModelSettingCustomerNotificationTypeEnum +func GetModelSettingCustomerNotificationTypeEnumValues() []ModelSettingCustomerNotificationTypeEnum { + values := make([]ModelSettingCustomerNotificationTypeEnum, 0) + for _, v := range mappingModelSettingCustomerNotificationTypeEnum { + values = append(values, v) + } + return values +} + +// GetModelSettingCustomerNotificationTypeEnumStringValues Enumerates the set of values in String for ModelSettingCustomerNotificationTypeEnum +func GetModelSettingCustomerNotificationTypeEnumStringValues() []string { + return []string{ + "NONE", + "ALL", + "ON_FAILURE", + "ON_SUCCESS", + } +} + +// GetMappingModelSettingCustomerNotificationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingModelSettingCustomerNotificationTypeEnum(val string) (ModelSettingCustomerNotificationTypeEnum, bool) { + enum, ok := mappingModelSettingCustomerNotificationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_summary.go index 44801bb3069..0fe7658dab3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/model_summary.go @@ -52,6 +52,9 @@ type ModelSummary struct { // The version label can add an additional description of the lifecycle state of the model or the application using and training the model. VersionLabel *string `mandatory:"true" json:"versionLabel"` + // Details about the lifecycle state of the model. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. See Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). // Example: `{"Department": "Finance"}` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/restore_archived_model_artifact_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/restore_archived_model_artifact_request_response.go new file mode 100644 index 00000000000..0670aee6290 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/restore_archived_model_artifact_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package datascience + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RestoreArchivedModelArtifactRequest wrapper for the RestoreArchivedModelArtifact operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/datascience/RestoreArchivedModelArtifact.go.html to see an example of how to use RestoreArchivedModelArtifactRequest. +type RestoreArchivedModelArtifactRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. + ModelId *string `mandatory:"true" contributesTo:"path" name:"modelId"` + + // Duration in hours for which the archived model is available for access. + RestoreModelForHoursSpecified *int `mandatory:"false" contributesTo:"query" name:"restoreModelForHoursSpecified"` + + // Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource is updated or deleted only if the `etag` you + // provide matches the resource's current `etag` value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RestoreArchivedModelArtifactRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RestoreArchivedModelArtifactRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RestoreArchivedModelArtifactRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RestoreArchivedModelArtifactRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RestoreArchivedModelArtifactRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RestoreArchivedModelArtifactResponse wrapper for the RestoreArchivedModelArtifact operation +type RestoreArchivedModelArtifactResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle assigned identifier for the request. If you need to contact + // Oracle about a particular request, then provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RestoreArchivedModelArtifactResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RestoreArchivedModelArtifactResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_operation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_operation_details.go new file mode 100644 index 00000000000..786088fbc90 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_operation_details.go @@ -0,0 +1,60 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Data Science API +// +// Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see Data Science (https://docs.oracle.com/iaas/data-science/using/data-science.htm). +// + +package datascience + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RetentionOperationDetails Retention operation details for the model. +type RetentionOperationDetails struct { + + // The archival status of model. + ArchiveState ModelSettingActionStateEnum `mandatory:"true" json:"archiveState"` + + // The archival state details of the model. + ArchiveStateDetails *string `mandatory:"true" json:"archiveStateDetails"` + + // The estimated archival time of the model based on the provided retention setting. + TimeArchivalScheduled *common.SDKTime `mandatory:"true" json:"timeArchivalScheduled"` + + // The deletion status of the archived model. + DeleteState ModelSettingActionStateEnum `mandatory:"true" json:"deleteState"` + + // The deletion status details of the archived model. + DeleteStateDetails *string `mandatory:"true" json:"deleteStateDetails"` + + // The estimated deletion time of the model based on the provided retention setting. + TimeDeletionScheduled *common.SDKTime `mandatory:"true" json:"timeDeletionScheduled"` +} + +func (m RetentionOperationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RetentionOperationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingModelSettingActionStateEnum(string(m.ArchiveState)); !ok && m.ArchiveState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ArchiveState: %s. Supported values are: %s.", m.ArchiveState, strings.Join(GetModelSettingActionStateEnumStringValues(), ","))) + } + if _, ok := GetMappingModelSettingActionStateEnum(string(m.DeleteState)); !ok && m.DeleteState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DeleteState: %s. Supported values are: %s.", m.DeleteState, strings.Join(GetModelSettingActionStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_setting.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_setting.go new file mode 100644 index 00000000000..2969680bea7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/retention_setting.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Data Science API +// +// Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see Data Science (https://docs.oracle.com/iaas/data-science/using/data-science.htm). +// + +package datascience + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RetentionSetting Retention setting details of the model. +type RetentionSetting struct { + + // Number of days after which the model will be archived. + ArchiveAfterDays *int `mandatory:"true" json:"archiveAfterDays"` + + // Number of days after which the archived model will be deleted. + DeleteAfterDays *int `mandatory:"false" json:"deleteAfterDays"` + + // Customer notification options on success/failure of archival, deletion events. + CustomerNotificationType ModelSettingCustomerNotificationTypeEnum `mandatory:"false" json:"customerNotificationType,omitempty"` +} + +func (m RetentionSetting) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RetentionSetting) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingModelSettingCustomerNotificationTypeEnum(string(m.CustomerNotificationType)); !ok && m.CustomerNotificationType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CustomerNotificationType: %s. Supported values are: %s.", m.CustomerNotificationType, strings.Join(GetModelSettingCustomerNotificationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/update_model_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/update_model_details.go index 7b410665c92..e7aa158bed0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/update_model_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/update_model_details.go @@ -44,6 +44,10 @@ type UpdateModelDetails struct { // The version label can add an additional description of the lifecycle state of the model or the application using/training the model. VersionLabel *string `mandatory:"false" json:"versionLabel"` + + RetentionSetting *RetentionSetting `mandatory:"false" json:"retentionSetting"` + + BackupSetting *BackupSetting `mandatory:"false" json:"backupSetting"` } func (m UpdateModelDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/work_request_operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/work_request_operation_type.go index 37af373115a..10f6d7ddc5d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/datascience/work_request_operation_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/datascience/work_request_operation_type.go @@ -42,6 +42,7 @@ const ( WorkRequestOperationTypePrivateEndpointDelete WorkRequestOperationTypeEnum = "PRIVATE_ENDPOINT_DELETE" WorkRequestOperationTypePrivateEndpointMove WorkRequestOperationTypeEnum = "PRIVATE_ENDPOINT_MOVE" WorkRequestOperationTypePrivateEndpointUpdate WorkRequestOperationTypeEnum = "PRIVATE_ENDPOINT_UPDATE" + WorkRequestOperationTypeRestoreArchivedModel WorkRequestOperationTypeEnum = "RESTORE_ARCHIVED_MODEL" ) var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnum{ @@ -69,6 +70,7 @@ var mappingWorkRequestOperationTypeEnum = map[string]WorkRequestOperationTypeEnu "PRIVATE_ENDPOINT_DELETE": WorkRequestOperationTypePrivateEndpointDelete, "PRIVATE_ENDPOINT_MOVE": WorkRequestOperationTypePrivateEndpointMove, "PRIVATE_ENDPOINT_UPDATE": WorkRequestOperationTypePrivateEndpointUpdate, + "RESTORE_ARCHIVED_MODEL": WorkRequestOperationTypeRestoreArchivedModel, } var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperationTypeEnum{ @@ -96,6 +98,7 @@ var mappingWorkRequestOperationTypeEnumLowerCase = map[string]WorkRequestOperati "private_endpoint_delete": WorkRequestOperationTypePrivateEndpointDelete, "private_endpoint_move": WorkRequestOperationTypePrivateEndpointMove, "private_endpoint_update": WorkRequestOperationTypePrivateEndpointUpdate, + "restore_archived_model": WorkRequestOperationTypeRestoreArchivedModel, } // GetWorkRequestOperationTypeEnumValues Enumerates the set of values for WorkRequestOperationTypeEnum @@ -134,6 +137,7 @@ func GetWorkRequestOperationTypeEnumStringValues() []string { "PRIVATE_ENDPOINT_DELETE", "PRIVATE_ENDPOINT_MOVE", "PRIVATE_ENDPOINT_UPDATE", + "RESTORE_ARCHIVED_MODEL", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_export_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_export_lock_request_response.go new file mode 100644 index 00000000000..42c4cd60dde --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_export_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddExportLockRequest wrapper for the AddExportLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddExportLock.go.html to see an example of how to use AddExportLockRequest. +type AddExportLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + ExportId *string `mandatory:"true" contributesTo:"path" name:"exportId"` + + // The details to be updated for the AddLock. + AddExportLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddExportLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddExportLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddExportLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddExportLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddExportLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddExportLockResponse wrapper for the AddExportLock operation +type AddExportLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Export instance + Export `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddExportLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddExportLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_file_system_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_file_system_lock_request_response.go new file mode 100644 index 00000000000..6de74b469cc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_file_system_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddFileSystemLockRequest wrapper for the AddFileSystemLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddFileSystemLock.go.html to see an example of how to use AddFileSystemLockRequest. +type AddFileSystemLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` + + // The details to be updated for the AddLock. + AddFileSystemLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddFileSystemLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddFileSystemLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddFileSystemLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddFileSystemLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddFileSystemLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddFileSystemLockResponse wrapper for the AddFileSystemLock operation +type AddFileSystemLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FileSystem instance + FileSystem `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddFileSystemLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddFileSystemLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_filesystem_snapshot_policy_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_filesystem_snapshot_policy_lock_request_response.go new file mode 100644 index 00000000000..f6591745079 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_filesystem_snapshot_policy_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddFilesystemSnapshotPolicyLockRequest wrapper for the AddFilesystemSnapshotPolicyLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddFilesystemSnapshotPolicyLock.go.html to see an example of how to use AddFilesystemSnapshotPolicyLockRequest. +type AddFilesystemSnapshotPolicyLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + FilesystemSnapshotPolicyId *string `mandatory:"true" contributesTo:"path" name:"filesystemSnapshotPolicyId"` + + // The details to be updated for the AddLock. + AddFilesystemSnapshotPolicyLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddFilesystemSnapshotPolicyLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddFilesystemSnapshotPolicyLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddFilesystemSnapshotPolicyLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddFilesystemSnapshotPolicyLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddFilesystemSnapshotPolicyLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddFilesystemSnapshotPolicyLockResponse wrapper for the AddFilesystemSnapshotPolicyLock operation +type AddFilesystemSnapshotPolicyLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FilesystemSnapshotPolicy instance + FilesystemSnapshotPolicy `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddFilesystemSnapshotPolicyLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddFilesystemSnapshotPolicyLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_mount_target_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_mount_target_lock_request_response.go new file mode 100644 index 00000000000..2077500374a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_mount_target_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddMountTargetLockRequest wrapper for the AddMountTargetLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddMountTargetLock.go.html to see an example of how to use AddMountTargetLockRequest. +type AddMountTargetLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` + + // The details to be updated for the AddLock. + AddMountTargetLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddMountTargetLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddMountTargetLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddMountTargetLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddMountTargetLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddMountTargetLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddMountTargetLockResponse wrapper for the AddMountTargetLock operation +type AddMountTargetLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MountTarget instance + MountTarget `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddMountTargetLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddMountTargetLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_outbound_connector_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_outbound_connector_lock_request_response.go new file mode 100644 index 00000000000..e046726c21f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_outbound_connector_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddOutboundConnectorLockRequest wrapper for the AddOutboundConnectorLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddOutboundConnectorLock.go.html to see an example of how to use AddOutboundConnectorLockRequest. +type AddOutboundConnectorLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + OutboundConnectorId *string `mandatory:"true" contributesTo:"path" name:"outboundConnectorId"` + + // The details to be updated for the AddLock. + AddOutboundConnectorLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddOutboundConnectorLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddOutboundConnectorLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddOutboundConnectorLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddOutboundConnectorLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddOutboundConnectorLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddOutboundConnectorLockResponse wrapper for the AddOutboundConnectorLock operation +type AddOutboundConnectorLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OutboundConnector instance + OutboundConnector `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddOutboundConnectorLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddOutboundConnectorLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_replication_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_replication_lock_request_response.go new file mode 100644 index 00000000000..ba5ed042956 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_replication_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddReplicationLockRequest wrapper for the AddReplicationLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddReplicationLock.go.html to see an example of how to use AddReplicationLockRequest. +type AddReplicationLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + ReplicationId *string `mandatory:"true" contributesTo:"path" name:"replicationId"` + + // The details to be updated for the AddLock. + AddReplicationLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddReplicationLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddReplicationLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddReplicationLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddReplicationLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddReplicationLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddReplicationLockResponse wrapper for the AddReplicationLock operation +type AddReplicationLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Replication instance + Replication `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddReplicationLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddReplicationLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_snapshot_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_snapshot_lock_request_response.go new file mode 100644 index 00000000000..b77cf237047 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/add_snapshot_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// AddSnapshotLockRequest wrapper for the AddSnapshotLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddSnapshotLock.go.html to see an example of how to use AddSnapshotLockRequest. +type AddSnapshotLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + SnapshotId *string `mandatory:"true" contributesTo:"path" name:"snapshotId"` + + // The details to be updated for the AddLock. + AddSnapshotLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request AddSnapshotLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request AddSnapshotLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request AddSnapshotLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request AddSnapshotLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request AddSnapshotLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// AddSnapshotLockResponse wrapper for the AddSnapshotLock operation +type AddSnapshotLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Snapshot instance + Snapshot `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response AddSnapshotLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response AddSnapshotLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_file_system_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_file_system_compartment_request_response.go index ef85c53df39..6cbea7b402d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_file_system_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_file_system_compartment_request_response.go @@ -35,6 +35,9 @@ type ChangeFileSystemCompartmentRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_filesystem_snapshot_policy_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_filesystem_snapshot_policy_compartment_request_response.go index 4d021eeaf1a..d85de64c02b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_filesystem_snapshot_policy_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_filesystem_snapshot_policy_compartment_request_response.go @@ -35,6 +35,9 @@ type ChangeFilesystemSnapshotPolicyCompartmentRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_mount_target_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_mount_target_compartment_request_response.go index a051cf04a78..e0e735268a9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_mount_target_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_mount_target_compartment_request_response.go @@ -35,6 +35,9 @@ type ChangeMountTargetCompartmentRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go index bf9c9508ee8..8d70d5087ef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_outbound_connector_compartment_request_response.go @@ -35,6 +35,9 @@ type ChangeOutboundConnectorCompartmentRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_replication_compartment_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_replication_compartment_request_response.go index cbbd7231645..f9410eda974 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_replication_compartment_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/change_replication_compartment_request_response.go @@ -35,6 +35,9 @@ type ChangeReplicationCompartmentRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go index 34c0f0b7712..dcdbfd2f3b4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_export_details.go @@ -58,6 +58,9 @@ type CreateExportDetails struct { // using the `UpdateExport` operation. ExportOptions []ClientOptions `mandatory:"false" json:"exportOptions"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. IsIdmapGroupsForSysAuth *bool `mandatory:"false" json:"isIdmapGroupsForSysAuth"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_file_system_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_file_system_details.go index 362f3ba8366..bd5a52473df 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_file_system_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_file_system_details.go @@ -42,6 +42,9 @@ type CreateFileSystemDetails struct { // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the KMS key used to encrypt the encryption keys associated with this file system. KmsKeyId *string `mandatory:"false" json:"kmsKeyId"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_filesystem_snapshot_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_filesystem_snapshot_policy_details.go index ed3f3b99850..829b2f0e47f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_filesystem_snapshot_policy_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_filesystem_snapshot_policy_details.go @@ -53,6 +53,9 @@ type CreateFilesystemSnapshotPolicyDetails struct { // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` } func (m CreateFilesystemSnapshotPolicyDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go index 2b62c21ae38..9198fc3ebd1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_ldap_bind_account_details.go @@ -50,6 +50,9 @@ type CreateLdapBindAccountDetails struct { // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the password for the LDAP bind account in the Vault. PasswordSecretId *string `mandatory:"false" json:"passwordSecretId"` @@ -82,6 +85,11 @@ func (m CreateLdapBindAccountDetails) GetDefinedTags() map[string]map[string]int return m.DefinedTags } +// GetLocks returns Locks +func (m CreateLdapBindAccountDetails) GetLocks() []ResourceLock { + return m.Locks +} + func (m CreateLdapBindAccountDetails) String() string { return common.PointerString(m) } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go index b68de5fe948..87ef6b28160 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_details.go @@ -83,6 +83,9 @@ type CreateMountTargetDetails struct { // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Throughput for mount target in Gbps. Currently only 1 Gbps of requestedThroughput is supported during create MountTarget. // Available shapes and corresponding throughput are listed at Mount Target Performance (https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). RequestedThroughput *int64 `mandatory:"false" json:"requestedThroughput"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_request_response.go index c7776ac9d03..a35cd4dffed 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_mount_target_request_response.go @@ -32,6 +32,9 @@ type CreateMountTargetRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go index 5260610b6d5..60a04b8b1de 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_outbound_connector_details.go @@ -43,6 +43,9 @@ type CreateOutboundConnectorDetails interface { // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). // Example: `{"Operations": {"CostCenter": "42"}}` GetDefinedTags() map[string]map[string]interface{} + + // Locks associated with this resource. + GetLocks() []ResourceLock } type createoutboundconnectordetails struct { @@ -50,6 +53,7 @@ type createoutboundconnectordetails struct { DisplayName *string `mandatory:"false" json:"displayName"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + Locks []ResourceLock `mandatory:"false" json:"locks"` AvailabilityDomain *string `mandatory:"true" json:"availabilityDomain"` CompartmentId *string `mandatory:"true" json:"compartmentId"` ConnectorType string `json:"connectorType"` @@ -71,6 +75,7 @@ func (m *createoutboundconnectordetails) UnmarshalJSON(data []byte) error { m.DisplayName = s.Model.DisplayName m.FreeformTags = s.Model.FreeformTags m.DefinedTags = s.Model.DefinedTags + m.Locks = s.Model.Locks m.ConnectorType = s.Model.ConnectorType return err @@ -110,6 +115,11 @@ func (m createoutboundconnectordetails) GetDefinedTags() map[string]map[string]i return m.DefinedTags } +// GetLocks returns Locks +func (m createoutboundconnectordetails) GetLocks() []ResourceLock { + return m.Locks +} + // GetAvailabilityDomain returns AvailabilityDomain func (m createoutboundconnectordetails) GetAvailabilityDomain() *string { return m.AvailabilityDomain diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_replication_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_replication_details.go index 81196e01f57..516114bf1fd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_replication_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_replication_details.go @@ -47,6 +47,9 @@ type CreateReplicationDetails struct { // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` } func (m CreateReplicationDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_snapshot_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_snapshot_details.go index 60b7618b442..b1529cdd413 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_snapshot_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/create_snapshot_details.go @@ -42,6 +42,9 @@ type CreateSnapshotDetails struct { // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). // Example: `{"Operations": {"CostCenter": "42"}}` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` } func (m CreateSnapshotDetails) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_export_request_response.go index 6b25690849e..cedba5807ad 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_export_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_export_request_response.go @@ -32,6 +32,9 @@ type DeleteExportRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_file_system_request_response.go index 434675c8c9d..85293a1630c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_file_system_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_file_system_request_response.go @@ -32,6 +32,9 @@ type DeleteFileSystemRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // If the value is set to true, then the file system will be deleted by detaching its child file system, turning // the child file system into an independent File System. CanDetachChildFileSystem *bool `mandatory:"false" contributesTo:"query" name:"canDetachChildFileSystem"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_filesystem_snapshot_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_filesystem_snapshot_policy_request_response.go index 6e95027d67d..55ac5578a1a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_filesystem_snapshot_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_filesystem_snapshot_policy_request_response.go @@ -32,6 +32,9 @@ type DeleteFilesystemSnapshotPolicyRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_mount_target_request_response.go index 667ba676b56..48fb9a77eb1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_mount_target_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_mount_target_request_response.go @@ -32,6 +32,9 @@ type DeleteMountTargetRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go index a4439dad71f..92327b0cd0e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_outbound_connector_request_response.go @@ -32,6 +32,9 @@ type DeleteOutboundConnectorRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_request_response.go index 2bce158f799..afe8e9c8d35 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_request_response.go @@ -38,6 +38,9 @@ type DeleteReplicationRequest struct { // - `FINISH_CYCLE_IF_APPLYING` Before deleting, finish applying. If cycle is idle or capturing, delete immediately. Fastest option. DeleteMode DeleteReplicationDeleteModeEnum `mandatory:"false" contributesTo:"query" name:"deleteMode" omitEmpty:"true"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_target_request_response.go index 67807a31f3f..16aa15b76c6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_target_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_replication_target_request_response.go @@ -32,6 +32,9 @@ type DeleteReplicationTargetRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_snapshot_request_response.go index 0f20a159b82..3dcebf4e7e7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_snapshot_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/delete_snapshot_request_response.go @@ -32,6 +32,9 @@ type DeleteSnapshotRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go index 83caf261d4e..21f9d14551b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export.go @@ -92,6 +92,9 @@ type Export struct { // Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. IsIdmapGroupsForSysAuth *bool `mandatory:"false" json:"isIdmapGroupsForSysAuth"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` } func (m Export) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go index 9bf7394d84d..c2f837f87b4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/export_summary.go @@ -43,6 +43,9 @@ type ExportSummary struct { // Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read. IsIdmapGroupsForSysAuth *bool `mandatory:"false" json:"isIdmapGroupsForSysAuth"` + + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` } func (m ExportSummary) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go index d3ea3ae4b04..34d1071163f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system.go @@ -90,6 +90,9 @@ type FileSystem struct { // Specifies whether the file system is attached to its parent file system. CloneAttachStatus FileSystemCloneAttachStatusEnum `mandatory:"false" json:"cloneAttachStatus,omitempty"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Additional information about the current 'lifecycleState'. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system_summary.go index d1a07495457..3d899744385 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/file_system_summary.go @@ -49,6 +49,9 @@ type FileSystemSummary struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go index aacdc9ff77b..a5512733f95 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filestorage_client.go @@ -92,12 +92,12 @@ func (client *FileStorageClient) ConfigurationProvider() *common.ConfigurationPr return client.config } -// CancelDowngradeShapeMountTarget Cancel scheduled downgrade shape request for mount target. +// AddExportLock Adds a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CancelDowngradeShapeMountTarget.go.html to see an example of how to use CancelDowngradeShapeMountTarget API. -func (client FileStorageClient) CancelDowngradeShapeMountTarget(ctx context.Context, request CancelDowngradeShapeMountTargetRequest) (response CancelDowngradeShapeMountTargetResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddExportLock.go.html to see an example of how to use AddExportLock API. +func (client FileStorageClient) AddExportLock(ctx context.Context, request AddExportLockRequest) (response AddExportLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -106,42 +106,42 @@ func (client FileStorageClient) CancelDowngradeShapeMountTarget(ctx context.Cont if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.cancelDowngradeShapeMountTarget, policy) + ociResponse, err = common.Retry(ctx, request, client.addExportLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CancelDowngradeShapeMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = AddExportLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CancelDowngradeShapeMountTargetResponse{} + response = AddExportLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(CancelDowngradeShapeMountTargetResponse); ok { + if convertedResponse, ok := ociResponse.(AddExportLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CancelDowngradeShapeMountTargetResponse") + err = fmt.Errorf("failed to convert OCIResponse into AddExportLockResponse") } return } -// cancelDowngradeShapeMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) cancelDowngradeShapeMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// addExportLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) addExportLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets/{mountTargetId}/actions/cancelShapeDowngrade", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/exports/{exportId}/actions/addLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CancelDowngradeShapeMountTargetResponse + var response AddExportLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CancelDowngradeShapeMountTarget" - err = common.PostProcessServiceError(err, "FileStorage", "CancelDowngradeShapeMountTarget", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/AddExportLock" + err = common.PostProcessServiceError(err, "FileStorage", "AddExportLock", apiReferenceLink) return response, err } @@ -149,12 +149,12 @@ func (client FileStorageClient) cancelDowngradeShapeMountTarget(ctx context.Cont return response, err } -// ChangeFileSystemCompartment Moves a file system and its associated snapshots into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) +// AddFileSystemLock Adds a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeFileSystemCompartment.go.html to see an example of how to use ChangeFileSystemCompartment API. -func (client FileStorageClient) ChangeFileSystemCompartment(ctx context.Context, request ChangeFileSystemCompartmentRequest) (response ChangeFileSystemCompartmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddFileSystemLock.go.html to see an example of how to use AddFileSystemLock API. +func (client FileStorageClient) AddFileSystemLock(ctx context.Context, request AddFileSystemLockRequest) (response AddFileSystemLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -163,42 +163,42 @@ func (client FileStorageClient) ChangeFileSystemCompartment(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.changeFileSystemCompartment, policy) + ociResponse, err = common.Retry(ctx, request, client.addFileSystemLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ChangeFileSystemCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = AddFileSystemLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ChangeFileSystemCompartmentResponse{} + response = AddFileSystemLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ChangeFileSystemCompartmentResponse); ok { + if convertedResponse, ok := ociResponse.(AddFileSystemLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ChangeFileSystemCompartmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into AddFileSystemLockResponse") } return } -// changeFileSystemCompartment implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) changeFileSystemCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// addFileSystemLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) addFileSystemLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/changeCompartment", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/addLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ChangeFileSystemCompartmentResponse + var response AddFileSystemLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ChangeFileSystemCompartment" - err = common.PostProcessServiceError(err, "FileStorage", "ChangeFileSystemCompartment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/AddFileSystemLock" + err = common.PostProcessServiceError(err, "FileStorage", "AddFileSystemLock", apiReferenceLink) return response, err } @@ -206,12 +206,12 @@ func (client FileStorageClient) changeFileSystemCompartment(ctx context.Context, return response, err } -// ChangeFilesystemSnapshotPolicyCompartment Moves a file system snapshot policy into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// AddFilesystemSnapshotPolicyLock Adds a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeFilesystemSnapshotPolicyCompartment.go.html to see an example of how to use ChangeFilesystemSnapshotPolicyCompartment API. -func (client FileStorageClient) ChangeFilesystemSnapshotPolicyCompartment(ctx context.Context, request ChangeFilesystemSnapshotPolicyCompartmentRequest) (response ChangeFilesystemSnapshotPolicyCompartmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddFilesystemSnapshotPolicyLock.go.html to see an example of how to use AddFilesystemSnapshotPolicyLock API. +func (client FileStorageClient) AddFilesystemSnapshotPolicyLock(ctx context.Context, request AddFilesystemSnapshotPolicyLockRequest) (response AddFilesystemSnapshotPolicyLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -220,42 +220,42 @@ func (client FileStorageClient) ChangeFilesystemSnapshotPolicyCompartment(ctx co if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.changeFilesystemSnapshotPolicyCompartment, policy) + ociResponse, err = common.Retry(ctx, request, client.addFilesystemSnapshotPolicyLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ChangeFilesystemSnapshotPolicyCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = AddFilesystemSnapshotPolicyLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ChangeFilesystemSnapshotPolicyCompartmentResponse{} + response = AddFilesystemSnapshotPolicyLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ChangeFilesystemSnapshotPolicyCompartmentResponse); ok { + if convertedResponse, ok := ociResponse.(AddFilesystemSnapshotPolicyLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ChangeFilesystemSnapshotPolicyCompartmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into AddFilesystemSnapshotPolicyLockResponse") } return } -// changeFilesystemSnapshotPolicyCompartment implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) changeFilesystemSnapshotPolicyCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// addFilesystemSnapshotPolicyLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) addFilesystemSnapshotPolicyLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}/actions/changeCompartment", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}/actions/addLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ChangeFilesystemSnapshotPolicyCompartmentResponse + var response AddFilesystemSnapshotPolicyLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/ChangeFilesystemSnapshotPolicyCompartment" - err = common.PostProcessServiceError(err, "FileStorage", "ChangeFilesystemSnapshotPolicyCompartment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/AddFilesystemSnapshotPolicyLock" + err = common.PostProcessServiceError(err, "FileStorage", "AddFilesystemSnapshotPolicyLock", apiReferenceLink) return response, err } @@ -263,12 +263,12 @@ func (client FileStorageClient) changeFilesystemSnapshotPolicyCompartment(ctx co return response, err } -// ChangeMountTargetCompartment Moves a mount target and its associated export set or share set into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) +// AddMountTargetLock Adds a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeMountTargetCompartment.go.html to see an example of how to use ChangeMountTargetCompartment API. -func (client FileStorageClient) ChangeMountTargetCompartment(ctx context.Context, request ChangeMountTargetCompartmentRequest) (response ChangeMountTargetCompartmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddMountTargetLock.go.html to see an example of how to use AddMountTargetLock API. +func (client FileStorageClient) AddMountTargetLock(ctx context.Context, request AddMountTargetLockRequest) (response AddMountTargetLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -277,42 +277,42 @@ func (client FileStorageClient) ChangeMountTargetCompartment(ctx context.Context if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.changeMountTargetCompartment, policy) + ociResponse, err = common.Retry(ctx, request, client.addMountTargetLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ChangeMountTargetCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = AddMountTargetLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ChangeMountTargetCompartmentResponse{} + response = AddMountTargetLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ChangeMountTargetCompartmentResponse); ok { + if convertedResponse, ok := ociResponse.(AddMountTargetLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ChangeMountTargetCompartmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into AddMountTargetLockResponse") } return } -// changeMountTargetCompartment implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) changeMountTargetCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// addMountTargetLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) addMountTargetLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets/{mountTargetId}/actions/changeCompartment", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets/{mountTargetId}/actions/addLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ChangeMountTargetCompartmentResponse + var response AddMountTargetLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/ChangeMountTargetCompartment" - err = common.PostProcessServiceError(err, "FileStorage", "ChangeMountTargetCompartment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/AddMountTargetLock" + err = common.PostProcessServiceError(err, "FileStorage", "AddMountTargetLock", apiReferenceLink) return response, err } @@ -320,14 +320,12 @@ func (client FileStorageClient) changeMountTargetCompartment(ctx context.Context return response, err } -// ChangeOutboundConnectorCompartment Moves an outbound connector into a different compartment within the same tenancy. -// For information about moving resources between compartments, see -// Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) +// AddOutboundConnectorLock Adds a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeOutboundConnectorCompartment.go.html to see an example of how to use ChangeOutboundConnectorCompartment API. -func (client FileStorageClient) ChangeOutboundConnectorCompartment(ctx context.Context, request ChangeOutboundConnectorCompartmentRequest) (response ChangeOutboundConnectorCompartmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddOutboundConnectorLock.go.html to see an example of how to use AddOutboundConnectorLock API. +func (client FileStorageClient) AddOutboundConnectorLock(ctx context.Context, request AddOutboundConnectorLockRequest) (response AddOutboundConnectorLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -336,56 +334,55 @@ func (client FileStorageClient) ChangeOutboundConnectorCompartment(ctx context.C if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.changeOutboundConnectorCompartment, policy) + ociResponse, err = common.Retry(ctx, request, client.addOutboundConnectorLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ChangeOutboundConnectorCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = AddOutboundConnectorLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ChangeOutboundConnectorCompartmentResponse{} + response = AddOutboundConnectorLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ChangeOutboundConnectorCompartmentResponse); ok { + if convertedResponse, ok := ociResponse.(AddOutboundConnectorLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ChangeOutboundConnectorCompartmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into AddOutboundConnectorLockResponse") } return } -// changeOutboundConnectorCompartment implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) changeOutboundConnectorCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// addOutboundConnectorLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) addOutboundConnectorLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors/{outboundConnectorId}/actions/changeCompartment", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors/{outboundConnectorId}/actions/addLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ChangeOutboundConnectorCompartmentResponse + var response AddOutboundConnectorLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/ChangeOutboundConnectorCompartment" - err = common.PostProcessServiceError(err, "FileStorage", "ChangeOutboundConnectorCompartment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/AddOutboundConnectorLock" + err = common.PostProcessServiceError(err, "FileStorage", "AddOutboundConnectorLock", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) return response, err } -// ChangeReplicationCompartment Moves a replication and its replication target into a different compartment within the same tenancy. -// For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// AddReplicationLock Adds a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeReplicationCompartment.go.html to see an example of how to use ChangeReplicationCompartment API. -func (client FileStorageClient) ChangeReplicationCompartment(ctx context.Context, request ChangeReplicationCompartmentRequest) (response ChangeReplicationCompartmentResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddReplicationLock.go.html to see an example of how to use AddReplicationLock API. +func (client FileStorageClient) AddReplicationLock(ctx context.Context, request AddReplicationLockRequest) (response AddReplicationLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -394,42 +391,42 @@ func (client FileStorageClient) ChangeReplicationCompartment(ctx context.Context if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.changeReplicationCompartment, policy) + ociResponse, err = common.Retry(ctx, request, client.addReplicationLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ChangeReplicationCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = AddReplicationLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ChangeReplicationCompartmentResponse{} + response = AddReplicationLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ChangeReplicationCompartmentResponse); ok { + if convertedResponse, ok := ociResponse.(AddReplicationLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ChangeReplicationCompartmentResponse") + err = fmt.Errorf("failed to convert OCIResponse into AddReplicationLockResponse") } return } -// changeReplicationCompartment implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) changeReplicationCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// addReplicationLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) addReplicationLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/replications/{replicationId}/actions/changeCompartment", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/replications/{replicationId}/actions/addLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ChangeReplicationCompartmentResponse + var response AddReplicationLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/ChangeReplicationCompartment" - err = common.PostProcessServiceError(err, "FileStorage", "ChangeReplicationCompartment", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/AddReplicationLock" + err = common.PostProcessServiceError(err, "FileStorage", "AddReplicationLock", apiReferenceLink) return response, err } @@ -437,13 +434,12 @@ func (client FileStorageClient) changeReplicationCompartment(ctx context.Context return response, err } -// CreateExport Creates a new export in the specified export set, path, and -// file system. +// AddSnapshotLock Adds a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateExport.go.html to see an example of how to use CreateExport API. -func (client FileStorageClient) CreateExport(ctx context.Context, request CreateExportRequest) (response CreateExportResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/AddSnapshotLock.go.html to see an example of how to use AddSnapshotLock API. +func (client FileStorageClient) AddSnapshotLock(ctx context.Context, request AddSnapshotLockRequest) (response AddSnapshotLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -452,47 +448,42 @@ func (client FileStorageClient) CreateExport(ctx context.Context, request Create if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - - if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { - request.OpcRetryToken = common.String(common.RetryToken()) - } - - ociResponse, err = common.Retry(ctx, request, client.createExport, policy) + ociResponse, err = common.Retry(ctx, request, client.addSnapshotLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateExportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = AddSnapshotLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateExportResponse{} + response = AddSnapshotLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateExportResponse); ok { + if convertedResponse, ok := ociResponse.(AddSnapshotLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateExportResponse") + err = fmt.Errorf("failed to convert OCIResponse into AddSnapshotLockResponse") } return } -// createExport implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createExport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// addSnapshotLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) addSnapshotLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/exports", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/snapshots/{snapshotId}/actions/addLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateExportResponse + var response AddSnapshotLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/CreateExport" - err = common.PostProcessServiceError(err, "FileStorage", "CreateExport", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/AddSnapshotLock" + err = common.PostProcessServiceError(err, "FileStorage", "AddSnapshotLock", apiReferenceLink) return response, err } @@ -500,35 +491,12 @@ func (client FileStorageClient) createExport(ctx context.Context, request common return response, err } -// CreateFileSystem Creates a new file system in the specified compartment and -// availability domain. Instances can mount file systems in -// another availability domain, but doing so might increase -// latency when compared to mounting instances in the same -// availability domain. -// After you create a file system, you can associate it with a mount -// target. Instances can then mount the file system by connecting to the -// mount target's IP address. You can associate a file system with -// more than one mount target at a time. -// For information about access control and compartments, see -// Overview of the IAM Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). -// For information about Network Security Groups access control, see -// Network Security Groups (https://docs.cloud.oracle.com/Content/Network/Concepts/networksecuritygroups.htm). -// For information about availability domains, see Regions and -// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). -// To get a list of availability domains, use the -// `ListAvailabilityDomains` operation in the Identity and Access -// Management Service API. -// All Oracle Cloud Infrastructure resources, including -// file systems, get an Oracle-assigned, unique ID called an Oracle -// Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). -// When you create a resource, you can find its OCID in the response. -// You can also retrieve a resource's OCID by using a List API operation on that resource -// type or by viewing the resource in the Console. +// CancelDowngradeShapeMountTarget Cancel scheduled downgrade shape request for mount target. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateFileSystem.go.html to see an example of how to use CreateFileSystem API. -func (client FileStorageClient) CreateFileSystem(ctx context.Context, request CreateFileSystemRequest) (response CreateFileSystemResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CancelDowngradeShapeMountTarget.go.html to see an example of how to use CancelDowngradeShapeMountTarget API. +func (client FileStorageClient) CancelDowngradeShapeMountTarget(ctx context.Context, request CancelDowngradeShapeMountTargetRequest) (response CancelDowngradeShapeMountTargetResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -537,47 +505,42 @@ func (client FileStorageClient) CreateFileSystem(ctx context.Context, request Cr if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - - if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { - request.OpcRetryToken = common.String(common.RetryToken()) - } - - ociResponse, err = common.Retry(ctx, request, client.createFileSystem, policy) + ociResponse, err = common.Retry(ctx, request, client.cancelDowngradeShapeMountTarget, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateFileSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CancelDowngradeShapeMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateFileSystemResponse{} + response = CancelDowngradeShapeMountTargetResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateFileSystemResponse); ok { + if convertedResponse, ok := ociResponse.(CancelDowngradeShapeMountTargetResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateFileSystemResponse") + err = fmt.Errorf("failed to convert OCIResponse into CancelDowngradeShapeMountTargetResponse") } return } -// createFileSystem implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createFileSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// cancelDowngradeShapeMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) cancelDowngradeShapeMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets/{mountTargetId}/actions/cancelShapeDowngrade", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateFileSystemResponse + var response CancelDowngradeShapeMountTargetResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/CreateFileSystem" - err = common.PostProcessServiceError(err, "FileStorage", "CreateFileSystem", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CancelDowngradeShapeMountTarget" + err = common.PostProcessServiceError(err, "FileStorage", "CancelDowngradeShapeMountTarget", apiReferenceLink) return response, err } @@ -585,15 +548,12 @@ func (client FileStorageClient) createFileSystem(ctx context.Context, request co return response, err } -// CreateFilesystemSnapshotPolicy Creates a new file system snapshot policy in the specified compartment and -// availability domain. -// After you create a file system snapshot policy, you can associate it with -// file systems. +// ChangeFileSystemCompartment Moves a file system and its associated snapshots into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateFilesystemSnapshotPolicy.go.html to see an example of how to use CreateFilesystemSnapshotPolicy API. -func (client FileStorageClient) CreateFilesystemSnapshotPolicy(ctx context.Context, request CreateFilesystemSnapshotPolicyRequest) (response CreateFilesystemSnapshotPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeFileSystemCompartment.go.html to see an example of how to use ChangeFileSystemCompartment API. +func (client FileStorageClient) ChangeFileSystemCompartment(ctx context.Context, request ChangeFileSystemCompartmentRequest) (response ChangeFileSystemCompartmentResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -602,47 +562,42 @@ func (client FileStorageClient) CreateFilesystemSnapshotPolicy(ctx context.Conte if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - - if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { - request.OpcRetryToken = common.String(common.RetryToken()) - } - - ociResponse, err = common.Retry(ctx, request, client.createFilesystemSnapshotPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.changeFileSystemCompartment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ChangeFileSystemCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateFilesystemSnapshotPolicyResponse{} + response = ChangeFileSystemCompartmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateFilesystemSnapshotPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(ChangeFileSystemCompartmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateFilesystemSnapshotPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ChangeFileSystemCompartmentResponse") } return } -// createFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// changeFileSystemCompartment implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) changeFileSystemCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/changeCompartment", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateFilesystemSnapshotPolicyResponse + var response ChangeFileSystemCompartmentResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/CreateFilesystemSnapshotPolicy" - err = common.PostProcessServiceError(err, "FileStorage", "CreateFilesystemSnapshotPolicy", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/ChangeFileSystemCompartment" + err = common.PostProcessServiceError(err, "FileStorage", "ChangeFileSystemCompartment", apiReferenceLink) return response, err } @@ -650,39 +605,12 @@ func (client FileStorageClient) createFilesystemSnapshotPolicy(ctx context.Conte return response, err } -// CreateMountTarget Creates a new mount target in the specified compartment and -// subnet. You can associate a file system with a mount -// target only when they exist in the same availability domain. Instances -// can connect to mount targets in another availablity domain, but -// you might see higher latency than with instances in the same -// availability domain as the mount target. -// Mount targets have one or more private IP addresses that you can -// provide as the host portion of remote target parameters in -// client mount commands. These private IP addresses are listed -// in the privateIpIds property of the mount target and are highly available. Mount -// targets also consume additional IP addresses in their subnet. -// Do not use /30 or smaller subnets for mount target creation because they -// do not have sufficient available IP addresses. -// Allow at least three IP addresses for each mount target. -// For information about access control and compartments, see -// Overview of the IAM -// Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). -// For information about availability domains, see Regions and -// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). -// To get a list of availability domains, use the -// `ListAvailabilityDomains` operation in the Identity and Access -// Management Service API. -// All Oracle Cloud Infrastructure Services resources, including -// mount targets, get an Oracle-assigned, unique ID called an -// Oracle Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). -// When you create a resource, you can find its OCID in the response. -// You can also retrieve a resource's OCID by using a List API operation on that resource -// type, or by viewing the resource in the Console. +// ChangeFilesystemSnapshotPolicyCompartment Moves a file system snapshot policy into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateMountTarget.go.html to see an example of how to use CreateMountTarget API. -func (client FileStorageClient) CreateMountTarget(ctx context.Context, request CreateMountTargetRequest) (response CreateMountTargetResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeFilesystemSnapshotPolicyCompartment.go.html to see an example of how to use ChangeFilesystemSnapshotPolicyCompartment API. +func (client FileStorageClient) ChangeFilesystemSnapshotPolicyCompartment(ctx context.Context, request ChangeFilesystemSnapshotPolicyCompartmentRequest) (response ChangeFilesystemSnapshotPolicyCompartmentResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -691,47 +619,42 @@ func (client FileStorageClient) CreateMountTarget(ctx context.Context, request C if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - - if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { - request.OpcRetryToken = common.String(common.RetryToken()) - } - - ociResponse, err = common.Retry(ctx, request, client.createMountTarget, policy) + ociResponse, err = common.Retry(ctx, request, client.changeFilesystemSnapshotPolicyCompartment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ChangeFilesystemSnapshotPolicyCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateMountTargetResponse{} + response = ChangeFilesystemSnapshotPolicyCompartmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateMountTargetResponse); ok { + if convertedResponse, ok := ociResponse.(ChangeFilesystemSnapshotPolicyCompartmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateMountTargetResponse") + err = fmt.Errorf("failed to convert OCIResponse into ChangeFilesystemSnapshotPolicyCompartmentResponse") } return } -// createMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// changeFilesystemSnapshotPolicyCompartment implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) changeFilesystemSnapshotPolicyCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}/actions/changeCompartment", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateMountTargetResponse + var response ChangeFilesystemSnapshotPolicyCompartmentResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CreateMountTarget" - err = common.PostProcessServiceError(err, "FileStorage", "CreateMountTarget", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/ChangeFilesystemSnapshotPolicyCompartment" + err = common.PostProcessServiceError(err, "FileStorage", "ChangeFilesystemSnapshotPolicyCompartment", apiReferenceLink) return response, err } @@ -739,28 +662,12 @@ func (client FileStorageClient) createMountTarget(ctx context.Context, request c return response, err } -// CreateOutboundConnector Creates a new outbound connector in the specified compartment. -// You can associate an outbound connector with a mount target only when -// they exist in the same availability domain. -// For information about access control and compartments, see -// Overview of the IAM -// Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). -// For information about availability domains, see Regions and -// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). -// To get a list of availability domains, use the -// `ListAvailabilityDomains` operation in the Identity and Access -// Management Service API. -// All Oracle Cloud Infrastructure Services resources, including -// outbound connectors, get an Oracle-assigned, unique ID called an -// Oracle Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). -// When you create a resource, you can find its OCID in the response. -// You can also retrieve a resource's OCID by using a List API operation on that resource -// type, or by viewing the resource in the Console. +// ChangeMountTargetCompartment Moves a mount target and its associated export set or share set into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateOutboundConnector.go.html to see an example of how to use CreateOutboundConnector API. -func (client FileStorageClient) CreateOutboundConnector(ctx context.Context, request CreateOutboundConnectorRequest) (response CreateOutboundConnectorResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeMountTargetCompartment.go.html to see an example of how to use ChangeMountTargetCompartment API. +func (client FileStorageClient) ChangeMountTargetCompartment(ctx context.Context, request ChangeMountTargetCompartmentRequest) (response ChangeMountTargetCompartmentResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -769,83 +676,57 @@ func (client FileStorageClient) CreateOutboundConnector(ctx context.Context, req if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - - if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { - request.OpcRetryToken = common.String(common.RetryToken()) - } - - ociResponse, err = common.Retry(ctx, request, client.createOutboundConnector, policy) + ociResponse, err = common.Retry(ctx, request, client.changeMountTargetCompartment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ChangeMountTargetCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateOutboundConnectorResponse{} + response = ChangeMountTargetCompartmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateOutboundConnectorResponse); ok { + if convertedResponse, ok := ociResponse.(ChangeMountTargetCompartmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateOutboundConnectorResponse") + err = fmt.Errorf("failed to convert OCIResponse into ChangeMountTargetCompartmentResponse") } return } -// createOutboundConnector implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// changeMountTargetCompartment implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) changeMountTargetCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets/{mountTargetId}/actions/changeCompartment", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateOutboundConnectorResponse + var response ChangeMountTargetCompartmentResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/CreateOutboundConnector" - err = common.PostProcessServiceError(err, "FileStorage", "CreateOutboundConnector", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/ChangeMountTargetCompartment" + err = common.PostProcessServiceError(err, "FileStorage", "ChangeMountTargetCompartment", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// CreateReplication Creates a new replication in the specified compartment. -// Replications are the primary resource that governs the policy of cross-region replication between source -// and target file systems. Replications are associated with a secondary resource called a ReplicationTarget -// located in another availability domain. -// The associated replication target resource is automatically created along with the replication resource. -// The replication retrieves the delta of data between two snapshots of a source file system -// and sends it to the associated `ReplicationTarget`, which retrieves the delta and applies it to the target -// file system. -// Only unexported file systems can be used as target file systems. -// For more information, see Using Replication (https://docs.cloud.oracle.com/iaas/Content/File/Tasks/FSreplication.htm). -// For information about access control and compartments, see -// Overview of the IAM -// Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). -// For information about availability domains, see Regions and -// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). -// To get a list of availability domains, use the -// `ListAvailabilityDomains` operation in the Identity and Access -// Management Service API. -// All Oracle Cloud Infrastructure Services resources, including -// replications, get an Oracle-assigned, unique ID called an -// Oracle Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). -// When you create a resource, you can find its OCID in the response. -// You can also retrieve a resource's OCID by using a List API operation on that resource -// type, or by viewing the resource in the Console. +// ChangeOutboundConnectorCompartment Moves an outbound connector into a different compartment within the same tenancy. +// For information about moving resources between compartments, see +// Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes) // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateReplication.go.html to see an example of how to use CreateReplication API. -func (client FileStorageClient) CreateReplication(ctx context.Context, request CreateReplicationRequest) (response CreateReplicationResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeOutboundConnectorCompartment.go.html to see an example of how to use ChangeOutboundConnectorCompartment API. +func (client FileStorageClient) ChangeOutboundConnectorCompartment(ctx context.Context, request ChangeOutboundConnectorCompartmentRequest) (response ChangeOutboundConnectorCompartmentResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -854,47 +735,100 @@ func (client FileStorageClient) CreateReplication(ctx context.Context, request C if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } + ociResponse, err = common.Retry(ctx, request, client.changeOutboundConnectorCompartment, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ChangeOutboundConnectorCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ChangeOutboundConnectorCompartmentResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ChangeOutboundConnectorCompartmentResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ChangeOutboundConnectorCompartmentResponse") + } + return +} - if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { - request.OpcRetryToken = common.String(common.RetryToken()) +// changeOutboundConnectorCompartment implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) changeOutboundConnectorCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors/{outboundConnectorId}/actions/changeCompartment", binaryReqBody, extraHeaders) + if err != nil { + return nil, err } - ociResponse, err = common.Retry(ctx, request, client.createReplication, policy) + var response ChangeOutboundConnectorCompartmentResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/ChangeOutboundConnectorCompartment" + err = common.PostProcessServiceError(err, "FileStorage", "ChangeOutboundConnectorCompartment", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ChangeReplicationCompartment Moves a replication and its replication target into a different compartment within the same tenancy. +// For information about moving resources between compartments, see Moving Resources to a Different Compartment (https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes). +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ChangeReplicationCompartment.go.html to see an example of how to use ChangeReplicationCompartment API. +func (client FileStorageClient) ChangeReplicationCompartment(ctx context.Context, request ChangeReplicationCompartmentRequest) (response ChangeReplicationCompartmentResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.changeReplicationCompartment, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ChangeReplicationCompartmentResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateReplicationResponse{} + response = ChangeReplicationCompartmentResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateReplicationResponse); ok { + if convertedResponse, ok := ociResponse.(ChangeReplicationCompartmentResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateReplicationResponse") + err = fmt.Errorf("failed to convert OCIResponse into ChangeReplicationCompartmentResponse") } return } -// createReplication implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// changeReplicationCompartment implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) changeReplicationCompartment(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/replications", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/replications/{replicationId}/actions/changeCompartment", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateReplicationResponse + var response ChangeReplicationCompartmentResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/CreateReplication" - err = common.PostProcessServiceError(err, "FileStorage", "CreateReplication", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/ChangeReplicationCompartment" + err = common.PostProcessServiceError(err, "FileStorage", "ChangeReplicationCompartment", apiReferenceLink) return response, err } @@ -902,13 +836,13 @@ func (client FileStorageClient) createReplication(ctx context.Context, request c return response, err } -// CreateSnapshot Creates a new snapshot of the specified file system. You -// can access the snapshot at `.snapshot/`. +// CreateExport Creates a new export in the specified export set, path, and +// file system. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateSnapshot.go.html to see an example of how to use CreateSnapshot API. -func (client FileStorageClient) CreateSnapshot(ctx context.Context, request CreateSnapshotRequest) (response CreateSnapshotResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateExport.go.html to see an example of how to use CreateExport API. +func (client FileStorageClient) CreateExport(ctx context.Context, request CreateExportRequest) (response CreateExportResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -922,42 +856,42 @@ func (client FileStorageClient) CreateSnapshot(ctx context.Context, request Crea request.OpcRetryToken = common.String(common.RetryToken()) } - ociResponse, err = common.Retry(ctx, request, client.createSnapshot, policy) + ociResponse, err = common.Retry(ctx, request, client.createExport, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = CreateSnapshotResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateExportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = CreateSnapshotResponse{} + response = CreateExportResponse{} } } return } - if convertedResponse, ok := ociResponse.(CreateSnapshotResponse); ok { + if convertedResponse, ok := ociResponse.(CreateExportResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into CreateSnapshotResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateExportResponse") } return } -// createSnapshot implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) createSnapshot(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// createExport implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createExport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/snapshots", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/exports", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response CreateSnapshotResponse + var response CreateExportResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/CreateSnapshot" - err = common.PostProcessServiceError(err, "FileStorage", "CreateSnapshot", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/CreateExport" + err = common.PostProcessServiceError(err, "FileStorage", "CreateExport", apiReferenceLink) return response, err } @@ -965,12 +899,35 @@ func (client FileStorageClient) createSnapshot(ctx context.Context, request comm return response, err } -// DeleteExport Deletes the specified export. +// CreateFileSystem Creates a new file system in the specified compartment and +// availability domain. Instances can mount file systems in +// another availability domain, but doing so might increase +// latency when compared to mounting instances in the same +// availability domain. +// After you create a file system, you can associate it with a mount +// target. Instances can then mount the file system by connecting to the +// mount target's IP address. You can associate a file system with +// more than one mount target at a time. +// For information about access control and compartments, see +// Overview of the IAM Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). +// For information about Network Security Groups access control, see +// Network Security Groups (https://docs.cloud.oracle.com/Content/Network/Concepts/networksecuritygroups.htm). +// For information about availability domains, see Regions and +// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the +// `ListAvailabilityDomains` operation in the Identity and Access +// Management Service API. +// All Oracle Cloud Infrastructure resources, including +// file systems, get an Oracle-assigned, unique ID called an Oracle +// Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). +// When you create a resource, you can find its OCID in the response. +// You can also retrieve a resource's OCID by using a List API operation on that resource +// type or by viewing the resource in the Console. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteExport.go.html to see an example of how to use DeleteExport API. -func (client FileStorageClient) DeleteExport(ctx context.Context, request DeleteExportRequest) (response DeleteExportResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateFileSystem.go.html to see an example of how to use CreateFileSystem API. +func (client FileStorageClient) CreateFileSystem(ctx context.Context, request CreateFileSystemRequest) (response CreateFileSystemResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -979,42 +936,889 @@ func (client FileStorageClient) DeleteExport(ctx context.Context, request Delete if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteExport, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createFileSystem, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteExportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = CreateFileSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteExportResponse{} + response = CreateFileSystemResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteExportResponse); ok { + if convertedResponse, ok := ociResponse.(CreateFileSystemResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteExportResponse") + err = fmt.Errorf("failed to convert OCIResponse into CreateFileSystemResponse") + } + return +} + +// createFileSystem implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createFileSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateFileSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/CreateFileSystem" + err = common.PostProcessServiceError(err, "FileStorage", "CreateFileSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateFilesystemSnapshotPolicy Creates a new file system snapshot policy in the specified compartment and +// availability domain. +// After you create a file system snapshot policy, you can associate it with +// file systems. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateFilesystemSnapshotPolicy.go.html to see an example of how to use CreateFilesystemSnapshotPolicy API. +func (client FileStorageClient) CreateFilesystemSnapshotPolicy(ctx context.Context, request CreateFilesystemSnapshotPolicyRequest) (response CreateFilesystemSnapshotPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createFilesystemSnapshotPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateFilesystemSnapshotPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateFilesystemSnapshotPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateFilesystemSnapshotPolicyResponse") + } + return +} + +// createFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateFilesystemSnapshotPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/CreateFilesystemSnapshotPolicy" + err = common.PostProcessServiceError(err, "FileStorage", "CreateFilesystemSnapshotPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateMountTarget Creates a new mount target in the specified compartment and +// subnet. You can associate a file system with a mount +// target only when they exist in the same availability domain. Instances +// can connect to mount targets in another availablity domain, but +// you might see higher latency than with instances in the same +// availability domain as the mount target. +// Mount targets have one or more private IP addresses that you can +// provide as the host portion of remote target parameters in +// client mount commands. These private IP addresses are listed +// in the privateIpIds property of the mount target and are highly available. Mount +// targets also consume additional IP addresses in their subnet. +// Do not use /30 or smaller subnets for mount target creation because they +// do not have sufficient available IP addresses. +// Allow at least three IP addresses for each mount target. +// For information about access control and compartments, see +// Overview of the IAM +// Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). +// For information about availability domains, see Regions and +// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the +// `ListAvailabilityDomains` operation in the Identity and Access +// Management Service API. +// All Oracle Cloud Infrastructure Services resources, including +// mount targets, get an Oracle-assigned, unique ID called an +// Oracle Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). +// When you create a resource, you can find its OCID in the response. +// You can also retrieve a resource's OCID by using a List API operation on that resource +// type, or by viewing the resource in the Console. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateMountTarget.go.html to see an example of how to use CreateMountTarget API. +func (client FileStorageClient) CreateMountTarget(ctx context.Context, request CreateMountTargetRequest) (response CreateMountTargetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createMountTarget, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateMountTargetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateMountTargetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateMountTargetResponse") + } + return +} + +// createMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateMountTargetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/CreateMountTarget" + err = common.PostProcessServiceError(err, "FileStorage", "CreateMountTarget", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateOutboundConnector Creates a new outbound connector in the specified compartment. +// You can associate an outbound connector with a mount target only when +// they exist in the same availability domain. +// For information about access control and compartments, see +// Overview of the IAM +// Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). +// For information about availability domains, see Regions and +// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the +// `ListAvailabilityDomains` operation in the Identity and Access +// Management Service API. +// All Oracle Cloud Infrastructure Services resources, including +// outbound connectors, get an Oracle-assigned, unique ID called an +// Oracle Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). +// When you create a resource, you can find its OCID in the response. +// You can also retrieve a resource's OCID by using a List API operation on that resource +// type, or by viewing the resource in the Console. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateOutboundConnector.go.html to see an example of how to use CreateOutboundConnector API. +func (client FileStorageClient) CreateOutboundConnector(ctx context.Context, request CreateOutboundConnectorRequest) (response CreateOutboundConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createOutboundConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateOutboundConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateOutboundConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateOutboundConnectorResponse") + } + return +} + +// createOutboundConnector implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateOutboundConnectorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/CreateOutboundConnector" + err = common.PostProcessServiceError(err, "FileStorage", "CreateOutboundConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) + return response, err +} + +// CreateReplication Creates a new replication in the specified compartment. +// Replications are the primary resource that governs the policy of cross-region replication between source +// and target file systems. Replications are associated with a secondary resource called a ReplicationTarget +// located in another availability domain. +// The associated replication target resource is automatically created along with the replication resource. +// The replication retrieves the delta of data between two snapshots of a source file system +// and sends it to the associated `ReplicationTarget`, which retrieves the delta and applies it to the target +// file system. +// Only unexported file systems can be used as target file systems. +// For more information, see Using Replication (https://docs.cloud.oracle.com/iaas/Content/File/Tasks/FSreplication.htm). +// For information about access control and compartments, see +// Overview of the IAM +// Service (https://docs.cloud.oracle.com/Content/Identity/Concepts/overview.htm). +// For information about availability domains, see Regions and +// Availability Domains (https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm). +// To get a list of availability domains, use the +// `ListAvailabilityDomains` operation in the Identity and Access +// Management Service API. +// All Oracle Cloud Infrastructure Services resources, including +// replications, get an Oracle-assigned, unique ID called an +// Oracle Cloud Identifier (OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm)). +// When you create a resource, you can find its OCID in the response. +// You can also retrieve a resource's OCID by using a List API operation on that resource +// type, or by viewing the resource in the Console. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateReplication.go.html to see an example of how to use CreateReplication API. +func (client FileStorageClient) CreateReplication(ctx context.Context, request CreateReplicationRequest) (response CreateReplicationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createReplication, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateReplicationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateReplicationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateReplicationResponse") + } + return +} + +// createReplication implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/replications", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateReplicationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/CreateReplication" + err = common.PostProcessServiceError(err, "FileStorage", "CreateReplication", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSnapshot Creates a new snapshot of the specified file system. You +// can access the snapshot at `.snapshot/`. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/CreateSnapshot.go.html to see an example of how to use CreateSnapshot API. +func (client FileStorageClient) CreateSnapshot(ctx context.Context, request CreateSnapshotRequest) (response CreateSnapshotResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createSnapshot, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateSnapshotResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateSnapshotResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateSnapshotResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateSnapshotResponse") + } + return +} + +// createSnapshot implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) createSnapshot(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/snapshots", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateSnapshotResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/CreateSnapshot" + err = common.PostProcessServiceError(err, "FileStorage", "CreateSnapshot", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteExport Deletes the specified export. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteExport.go.html to see an example of how to use DeleteExport API. +func (client FileStorageClient) DeleteExport(ctx context.Context, request DeleteExportRequest) (response DeleteExportResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteExport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteExportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteExportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteExportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteExportResponse") + } + return +} + +// deleteExport implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteExport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/exports/{exportId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteExportResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/DeleteExport" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteExport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteFileSystem Deletes the specified file system. Before you delete the file system, +// verify that no remaining export resources still reference it. Deleting a +// file system also deletes all of its snapshots. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteFileSystem.go.html to see an example of how to use DeleteFileSystem API. +func (client FileStorageClient) DeleteFileSystem(ctx context.Context, request DeleteFileSystemRequest) (response DeleteFileSystemResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteFileSystem, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteFileSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteFileSystemResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteFileSystemResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteFileSystemResponse") + } + return +} + +// deleteFileSystem implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteFileSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fileSystems/{fileSystemId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteFileSystemResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DeleteFileSystem" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteFileSystem", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteFilesystemSnapshotPolicy Deletes the specified file system snapshot policy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteFilesystemSnapshotPolicy.go.html to see an example of how to use DeleteFilesystemSnapshotPolicy API. +func (client FileStorageClient) DeleteFilesystemSnapshotPolicy(ctx context.Context, request DeleteFilesystemSnapshotPolicyRequest) (response DeleteFilesystemSnapshotPolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteFilesystemSnapshotPolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteFilesystemSnapshotPolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteFilesystemSnapshotPolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteFilesystemSnapshotPolicyResponse") + } + return +} + +// deleteFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteFilesystemSnapshotPolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/DeleteFilesystemSnapshotPolicy" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteFilesystemSnapshotPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteMountTarget Deletes the specified mount target. This operation also deletes the +// mount target's VNICs. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteMountTarget.go.html to see an example of how to use DeleteMountTarget API. +func (client FileStorageClient) DeleteMountTarget(ctx context.Context, request DeleteMountTargetRequest) (response DeleteMountTargetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteMountTarget, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteMountTargetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteMountTargetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteMountTargetResponse") + } + return +} + +// deleteMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/mountTargets/{mountTargetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteMountTargetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/DeleteMountTarget" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteMountTarget", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteOutboundConnector Deletes the specified outbound connector. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteOutboundConnector.go.html to see an example of how to use DeleteOutboundConnector API. +func (client FileStorageClient) DeleteOutboundConnector(ctx context.Context, request DeleteOutboundConnectorRequest) (response DeleteOutboundConnectorResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteOutboundConnector, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteOutboundConnectorResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteOutboundConnectorResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteOutboundConnectorResponse") + } + return +} + +// deleteOutboundConnector implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/outboundConnectors/{outboundConnectorId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteOutboundConnectorResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/DeleteOutboundConnector" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteOutboundConnector", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteReplication Deletes the specified replication and the the associated replication target. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteReplication.go.html to see an example of how to use DeleteReplication API. +func (client FileStorageClient) DeleteReplication(ctx context.Context, request DeleteReplicationRequest) (response DeleteReplicationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteReplication, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteReplicationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteReplicationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteReplicationResponse") + } + return +} + +// deleteReplication implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/replications/{replicationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteReplicationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/DeleteReplication" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteReplication", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteReplicationTarget Deletes the specified replication target. +// This operation causes the immediate release of the target file system if there are currently no delta application operations. +// If there is any current delta being applied the delete operation is blocked until the current +// delta has been completely applied. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteReplicationTarget.go.html to see an example of how to use DeleteReplicationTarget API. +func (client FileStorageClient) DeleteReplicationTarget(ctx context.Context, request DeleteReplicationTargetRequest) (response DeleteReplicationTargetResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteReplicationTarget, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteReplicationTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteReplicationTargetResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteReplicationTargetResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteReplicationTargetResponse") + } + return +} + +// deleteReplicationTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteReplicationTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/replicationTargets/{replicationTargetId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteReplicationTargetResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/DeleteReplicationTarget" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteReplicationTarget", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteSnapshot Deletes the specified snapshot. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteSnapshot.go.html to see an example of how to use DeleteSnapshot API. +func (client FileStorageClient) DeleteSnapshot(ctx context.Context, request DeleteSnapshotRequest) (response DeleteSnapshotResponse, err error) { + var ociResponse common.OCIResponse + policy := common.NoRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteSnapshot, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteSnapshotResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteSnapshotResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteSnapshotResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteSnapshotResponse") } return } -// deleteExport implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteExport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteSnapshot implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) deleteSnapshot(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/exports/{exportId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/snapshots/{snapshotId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteExportResponse + var response DeleteSnapshotResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/DeleteExport" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteExport", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/DeleteSnapshot" + err = common.PostProcessServiceError(err, "FileStorage", "DeleteSnapshot", apiReferenceLink) return response, err } @@ -1022,14 +1826,12 @@ func (client FileStorageClient) deleteExport(ctx context.Context, request common return response, err } -// DeleteFileSystem Deletes the specified file system. Before you delete the file system, -// verify that no remaining export resources still reference it. Deleting a -// file system also deletes all of its snapshots. +// DetachClone Detaches the file system from its parent file system // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteFileSystem.go.html to see an example of how to use DeleteFileSystem API. -func (client FileStorageClient) DeleteFileSystem(ctx context.Context, request DeleteFileSystemRequest) (response DeleteFileSystemResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DetachClone.go.html to see an example of how to use DetachClone API. +func (client FileStorageClient) DetachClone(ctx context.Context, request DetachCloneRequest) (response DetachCloneResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1038,42 +1840,42 @@ func (client FileStorageClient) DeleteFileSystem(ctx context.Context, request De if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteFileSystem, policy) + ociResponse, err = common.Retry(ctx, request, client.detachClone, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteFileSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DetachCloneResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteFileSystemResponse{} + response = DetachCloneResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteFileSystemResponse); ok { + if convertedResponse, ok := ociResponse.(DetachCloneResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteFileSystemResponse") + err = fmt.Errorf("failed to convert OCIResponse into DetachCloneResponse") } return } -// deleteFileSystem implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteFileSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// detachClone implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) detachClone(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/fileSystems/{fileSystemId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/detachClone", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteFileSystemResponse + var response DetachCloneResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DeleteFileSystem" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteFileSystem", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DetachClone" + err = common.PostProcessServiceError(err, "FileStorage", "DetachClone", apiReferenceLink) return response, err } @@ -1081,12 +1883,12 @@ func (client FileStorageClient) deleteFileSystem(ctx context.Context, request co return response, err } -// DeleteFilesystemSnapshotPolicy Deletes the specified file system snapshot policy. +// EstimateReplication Provides estimates for replication created using specific file system. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteFilesystemSnapshotPolicy.go.html to see an example of how to use DeleteFilesystemSnapshotPolicy API. -func (client FileStorageClient) DeleteFilesystemSnapshotPolicy(ctx context.Context, request DeleteFilesystemSnapshotPolicyRequest) (response DeleteFilesystemSnapshotPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/EstimateReplication.go.html to see an example of how to use EstimateReplication API. +func (client FileStorageClient) EstimateReplication(ctx context.Context, request EstimateReplicationRequest) (response EstimateReplicationResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1095,42 +1897,42 @@ func (client FileStorageClient) DeleteFilesystemSnapshotPolicy(ctx context.Conte if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteFilesystemSnapshotPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.estimateReplication, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = EstimateReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteFilesystemSnapshotPolicyResponse{} + response = EstimateReplicationResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteFilesystemSnapshotPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(EstimateReplicationResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteFilesystemSnapshotPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into EstimateReplicationResponse") } return } -// deleteFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// estimateReplication implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) estimateReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/estimateReplication", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteFilesystemSnapshotPolicyResponse + var response EstimateReplicationResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/DeleteFilesystemSnapshotPolicy" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteFilesystemSnapshotPolicy", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/EstimateReplication" + err = common.PostProcessServiceError(err, "FileStorage", "EstimateReplication", apiReferenceLink) return response, err } @@ -1138,13 +1940,12 @@ func (client FileStorageClient) deleteFilesystemSnapshotPolicy(ctx context.Conte return response, err } -// DeleteMountTarget Deletes the specified mount target. This operation also deletes the -// mount target's VNICs. +// GetExport Gets the specified export's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteMountTarget.go.html to see an example of how to use DeleteMountTarget API. -func (client FileStorageClient) DeleteMountTarget(ctx context.Context, request DeleteMountTargetRequest) (response DeleteMountTargetResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetExport.go.html to see an example of how to use GetExport API. +func (client FileStorageClient) GetExport(ctx context.Context, request GetExportRequest) (response GetExportResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1153,42 +1954,42 @@ func (client FileStorageClient) DeleteMountTarget(ctx context.Context, request D if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteMountTarget, policy) + ociResponse, err = common.Retry(ctx, request, client.getExport, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetExportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteMountTargetResponse{} + response = GetExportResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteMountTargetResponse); ok { + if convertedResponse, ok := ociResponse.(GetExportResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteMountTargetResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetExportResponse") } return } -// deleteMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getExport implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getExport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/mountTargets/{mountTargetId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports/{exportId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteMountTargetResponse + var response GetExportResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/DeleteMountTarget" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteMountTarget", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/GetExport" + err = common.PostProcessServiceError(err, "FileStorage", "GetExport", apiReferenceLink) return response, err } @@ -1196,12 +1997,12 @@ func (client FileStorageClient) deleteMountTarget(ctx context.Context, request c return response, err } -// DeleteOutboundConnector Deletes the specified outbound connector. +// GetExportSet Gets the specified export set's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteOutboundConnector.go.html to see an example of how to use DeleteOutboundConnector API. -func (client FileStorageClient) DeleteOutboundConnector(ctx context.Context, request DeleteOutboundConnectorRequest) (response DeleteOutboundConnectorResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetExportSet.go.html to see an example of how to use GetExportSet API. +func (client FileStorageClient) GetExportSet(ctx context.Context, request GetExportSetRequest) (response GetExportSetResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1210,42 +2011,42 @@ func (client FileStorageClient) DeleteOutboundConnector(ctx context.Context, req if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteOutboundConnector, policy) + ociResponse, err = common.Retry(ctx, request, client.getExportSet, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetExportSetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteOutboundConnectorResponse{} + response = GetExportSetResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteOutboundConnectorResponse); ok { + if convertedResponse, ok := ociResponse.(GetExportSetResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteOutboundConnectorResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetExportSetResponse") } return } -// deleteOutboundConnector implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getExportSet implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getExportSet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/outboundConnectors/{outboundConnectorId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets/{exportSetId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteOutboundConnectorResponse + var response GetExportSetResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/DeleteOutboundConnector" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteOutboundConnector", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSet/GetExportSet" + err = common.PostProcessServiceError(err, "FileStorage", "GetExportSet", apiReferenceLink) return response, err } @@ -1253,12 +2054,12 @@ func (client FileStorageClient) deleteOutboundConnector(ctx context.Context, req return response, err } -// DeleteReplication Deletes the specified replication and the the associated replication target. +// GetFileSystem Gets the specified file system's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteReplication.go.html to see an example of how to use DeleteReplication API. -func (client FileStorageClient) DeleteReplication(ctx context.Context, request DeleteReplicationRequest) (response DeleteReplicationResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetFileSystem.go.html to see an example of how to use GetFileSystem API. +func (client FileStorageClient) GetFileSystem(ctx context.Context, request GetFileSystemRequest) (response GetFileSystemResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1267,42 +2068,42 @@ func (client FileStorageClient) DeleteReplication(ctx context.Context, request D if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteReplication, policy) + ociResponse, err = common.Retry(ctx, request, client.getFileSystem, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetFileSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteReplicationResponse{} + response = GetFileSystemResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteReplicationResponse); ok { + if convertedResponse, ok := ociResponse.(GetFileSystemResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteReplicationResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetFileSystemResponse") } return } -// deleteReplication implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getFileSystem implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getFileSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/replications/{replicationId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems/{fileSystemId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteReplicationResponse + var response GetFileSystemResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/DeleteReplication" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteReplication", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/GetFileSystem" + err = common.PostProcessServiceError(err, "FileStorage", "GetFileSystem", apiReferenceLink) return response, err } @@ -1310,15 +2111,12 @@ func (client FileStorageClient) deleteReplication(ctx context.Context, request c return response, err } -// DeleteReplicationTarget Deletes the specified replication target. -// This operation causes the immediate release of the target file system if there are currently no delta application operations. -// If there is any current delta being applied the delete operation is blocked until the current -// delta has been completely applied. +// GetFilesystemSnapshotPolicy Gets the specified file system snapshot policy's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteReplicationTarget.go.html to see an example of how to use DeleteReplicationTarget API. -func (client FileStorageClient) DeleteReplicationTarget(ctx context.Context, request DeleteReplicationTargetRequest) (response DeleteReplicationTargetResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetFilesystemSnapshotPolicy.go.html to see an example of how to use GetFilesystemSnapshotPolicy API. +func (client FileStorageClient) GetFilesystemSnapshotPolicy(ctx context.Context, request GetFilesystemSnapshotPolicyRequest) (response GetFilesystemSnapshotPolicyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1327,42 +2125,42 @@ func (client FileStorageClient) DeleteReplicationTarget(ctx context.Context, req if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteReplicationTarget, policy) + ociResponse, err = common.Retry(ctx, request, client.getFilesystemSnapshotPolicy, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteReplicationTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteReplicationTargetResponse{} + response = GetFilesystemSnapshotPolicyResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteReplicationTargetResponse); ok { + if convertedResponse, ok := ociResponse.(GetFilesystemSnapshotPolicyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteReplicationTargetResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetFilesystemSnapshotPolicyResponse") } return } -// deleteReplicationTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteReplicationTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/replicationTargets/{replicationTargetId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteReplicationTargetResponse + var response GetFilesystemSnapshotPolicyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/DeleteReplicationTarget" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteReplicationTarget", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/GetFilesystemSnapshotPolicy" + err = common.PostProcessServiceError(err, "FileStorage", "GetFilesystemSnapshotPolicy", apiReferenceLink) return response, err } @@ -1370,12 +2168,12 @@ func (client FileStorageClient) deleteReplicationTarget(ctx context.Context, req return response, err } -// DeleteSnapshot Deletes the specified snapshot. +// GetMountTarget Gets the specified mount target's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DeleteSnapshot.go.html to see an example of how to use DeleteSnapshot API. -func (client FileStorageClient) DeleteSnapshot(ctx context.Context, request DeleteSnapshotRequest) (response DeleteSnapshotResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetMountTarget.go.html to see an example of how to use GetMountTarget API. +func (client FileStorageClient) GetMountTarget(ctx context.Context, request GetMountTargetRequest) (response GetMountTargetResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1384,42 +2182,42 @@ func (client FileStorageClient) DeleteSnapshot(ctx context.Context, request Dele if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteSnapshot, policy) + ociResponse, err = common.Retry(ctx, request, client.getMountTarget, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeleteSnapshotResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeleteSnapshotResponse{} + response = GetMountTargetResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeleteSnapshotResponse); ok { + if convertedResponse, ok := ociResponse.(GetMountTargetResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeleteSnapshotResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetMountTargetResponse") } return } -// deleteSnapshot implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) deleteSnapshot(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getMountTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/snapshots/{snapshotId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets/{mountTargetId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeleteSnapshotResponse + var response GetMountTargetResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/DeleteSnapshot" - err = common.PostProcessServiceError(err, "FileStorage", "DeleteSnapshot", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/GetMountTarget" + err = common.PostProcessServiceError(err, "FileStorage", "GetMountTarget", apiReferenceLink) return response, err } @@ -1427,12 +2225,12 @@ func (client FileStorageClient) deleteSnapshot(ctx context.Context, request comm return response, err } -// DetachClone Detaches the file system from its parent file system +// GetOutboundConnector Gets the specified outbound connector's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/DetachClone.go.html to see an example of how to use DetachClone API. -func (client FileStorageClient) DetachClone(ctx context.Context, request DetachCloneRequest) (response DetachCloneResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetOutboundConnector.go.html to see an example of how to use GetOutboundConnector API. +func (client FileStorageClient) GetOutboundConnector(ctx context.Context, request GetOutboundConnectorRequest) (response GetOutboundConnectorResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1441,55 +2239,55 @@ func (client FileStorageClient) DetachClone(ctx context.Context, request DetachC if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.detachClone, policy) + ociResponse, err = common.Retry(ctx, request, client.getOutboundConnector, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DetachCloneResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DetachCloneResponse{} + response = GetOutboundConnectorResponse{} } } return } - if convertedResponse, ok := ociResponse.(DetachCloneResponse); ok { + if convertedResponse, ok := ociResponse.(GetOutboundConnectorResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DetachCloneResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetOutboundConnectorResponse") } return } -// detachClone implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) detachClone(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getOutboundConnector implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/detachClone", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/outboundConnectors/{outboundConnectorId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DetachCloneResponse + var response GetOutboundConnectorResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/DetachClone" - err = common.PostProcessServiceError(err, "FileStorage", "DetachClone", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/GetOutboundConnector" + err = common.PostProcessServiceError(err, "FileStorage", "GetOutboundConnector", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) return response, err } -// EstimateReplication Provides estimates for replication created using specific file system. +// GetReplication Gets the specified replication's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/EstimateReplication.go.html to see an example of how to use EstimateReplication API. -func (client FileStorageClient) EstimateReplication(ctx context.Context, request EstimateReplicationRequest) (response EstimateReplicationResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetReplication.go.html to see an example of how to use GetReplication API. +func (client FileStorageClient) GetReplication(ctx context.Context, request GetReplicationRequest) (response GetReplicationResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1498,42 +2296,42 @@ func (client FileStorageClient) EstimateReplication(ctx context.Context, request if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.estimateReplication, policy) + ociResponse, err = common.Retry(ctx, request, client.getReplication, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = EstimateReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = EstimateReplicationResponse{} + response = GetReplicationResponse{} } } return } - if convertedResponse, ok := ociResponse.(EstimateReplicationResponse); ok { + if convertedResponse, ok := ociResponse.(GetReplicationResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into EstimateReplicationResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetReplicationResponse") } return } -// estimateReplication implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) estimateReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getReplication implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/estimateReplication", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/replications/{replicationId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response EstimateReplicationResponse + var response GetReplicationResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/EstimateReplication" - err = common.PostProcessServiceError(err, "FileStorage", "EstimateReplication", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/GetReplication" + err = common.PostProcessServiceError(err, "FileStorage", "GetReplication", apiReferenceLink) return response, err } @@ -1541,12 +2339,12 @@ func (client FileStorageClient) estimateReplication(ctx context.Context, request return response, err } -// GetExport Gets the specified export's information. +// GetReplicationTarget Gets the specified replication target's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetExport.go.html to see an example of how to use GetExport API. -func (client FileStorageClient) GetExport(ctx context.Context, request GetExportRequest) (response GetExportResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetReplicationTarget.go.html to see an example of how to use GetReplicationTarget API. +func (client FileStorageClient) GetReplicationTarget(ctx context.Context, request GetReplicationTargetRequest) (response GetReplicationTargetResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1555,42 +2353,42 @@ func (client FileStorageClient) GetExport(ctx context.Context, request GetExport if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getExport, policy) + ociResponse, err = common.Retry(ctx, request, client.getReplicationTarget, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetExportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetReplicationTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetExportResponse{} + response = GetReplicationTargetResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetExportResponse); ok { + if convertedResponse, ok := ociResponse.(GetReplicationTargetResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExportResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetReplicationTargetResponse") } return } -// getExport implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getExport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getReplicationTarget implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getReplicationTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports/{exportId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/replicationTargets/{replicationTargetId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetExportResponse + var response GetReplicationTargetResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/GetExport" - err = common.PostProcessServiceError(err, "FileStorage", "GetExport", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/GetReplicationTarget" + err = common.PostProcessServiceError(err, "FileStorage", "GetReplicationTarget", apiReferenceLink) return response, err } @@ -1598,12 +2396,12 @@ func (client FileStorageClient) getExport(ctx context.Context, request common.OC return response, err } -// GetExportSet Gets the specified export set's information. +// GetSnapshot Gets the specified snapshot's information. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetExportSet.go.html to see an example of how to use GetExportSet API. -func (client FileStorageClient) GetExportSet(ctx context.Context, request GetExportSetRequest) (response GetExportSetResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetSnapshot.go.html to see an example of how to use GetSnapshot API. +func (client FileStorageClient) GetSnapshot(ctx context.Context, request GetSnapshotRequest) (response GetSnapshotResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1612,42 +2410,42 @@ func (client FileStorageClient) GetExportSet(ctx context.Context, request GetExp if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getExportSet, policy) + ociResponse, err = common.Retry(ctx, request, client.getSnapshot, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetExportSetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = GetSnapshotResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetExportSetResponse{} + response = GetSnapshotResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetExportSetResponse); ok { + if convertedResponse, ok := ociResponse.(GetSnapshotResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetExportSetResponse") + err = fmt.Errorf("failed to convert OCIResponse into GetSnapshotResponse") } return } -// getExportSet implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getExportSet(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// getSnapshot implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) getSnapshot(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets/{exportSetId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots/{snapshotId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetExportSetResponse + var response GetSnapshotResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSet/GetExportSet" - err = common.PostProcessServiceError(err, "FileStorage", "GetExportSet", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/GetSnapshot" + err = common.PostProcessServiceError(err, "FileStorage", "GetSnapshot", apiReferenceLink) return response, err } @@ -1655,12 +2453,12 @@ func (client FileStorageClient) getExportSet(ctx context.Context, request common return response, err } -// GetFileSystem Gets the specified file system's information. +// ListExportSets Lists the export set resources in the specified compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetFileSystem.go.html to see an example of how to use GetFileSystem API. -func (client FileStorageClient) GetFileSystem(ctx context.Context, request GetFileSystemRequest) (response GetFileSystemResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListExportSets.go.html to see an example of how to use ListExportSets API. +func (client FileStorageClient) ListExportSets(ctx context.Context, request ListExportSetsRequest) (response ListExportSetsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1669,42 +2467,42 @@ func (client FileStorageClient) GetFileSystem(ctx context.Context, request GetFi if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getFileSystem, policy) + ociResponse, err = common.Retry(ctx, request, client.listExportSets, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetFileSystemResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListExportSetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetFileSystemResponse{} + response = ListExportSetsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetFileSystemResponse); ok { + if convertedResponse, ok := ociResponse.(ListExportSetsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetFileSystemResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListExportSetsResponse") } return } -// getFileSystem implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getFileSystem(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listExportSets implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listExportSets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems/{fileSystemId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetFileSystemResponse + var response ListExportSetsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/GetFileSystem" - err = common.PostProcessServiceError(err, "FileStorage", "GetFileSystem", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSetSummary/ListExportSets" + err = common.PostProcessServiceError(err, "FileStorage", "ListExportSets", apiReferenceLink) return response, err } @@ -1712,12 +2510,14 @@ func (client FileStorageClient) getFileSystem(ctx context.Context, request commo return response, err } -// GetFilesystemSnapshotPolicy Gets the specified file system snapshot policy's information. +// ListExports Lists export resources by compartment, file system, or export +// set. You must specify an export set ID, a file system ID, and +// / or a compartment ID. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetFilesystemSnapshotPolicy.go.html to see an example of how to use GetFilesystemSnapshotPolicy API. -func (client FileStorageClient) GetFilesystemSnapshotPolicy(ctx context.Context, request GetFilesystemSnapshotPolicyRequest) (response GetFilesystemSnapshotPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListExports.go.html to see an example of how to use ListExports API. +func (client FileStorageClient) ListExports(ctx context.Context, request ListExportsRequest) (response ListExportsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1726,42 +2526,42 @@ func (client FileStorageClient) GetFilesystemSnapshotPolicy(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getFilesystemSnapshotPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.listExports, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListExportsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetFilesystemSnapshotPolicyResponse{} + response = ListExportsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetFilesystemSnapshotPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(ListExportsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetFilesystemSnapshotPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListExportsResponse") } return } -// getFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listExports implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listExports(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetFilesystemSnapshotPolicyResponse + var response ListExportsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/GetFilesystemSnapshotPolicy" - err = common.PostProcessServiceError(err, "FileStorage", "GetFilesystemSnapshotPolicy", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSummary/ListExports" + err = common.PostProcessServiceError(err, "FileStorage", "ListExports", apiReferenceLink) return response, err } @@ -1769,12 +2569,13 @@ func (client FileStorageClient) getFilesystemSnapshotPolicy(ctx context.Context, return response, err } -// GetMountTarget Gets the specified mount target's information. +// ListFileSystems Lists the file system resources in the specified compartment, or by the specified compartment and +// file system snapshot policy. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetMountTarget.go.html to see an example of how to use GetMountTarget API. -func (client FileStorageClient) GetMountTarget(ctx context.Context, request GetMountTargetRequest) (response GetMountTargetResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListFileSystems.go.html to see an example of how to use ListFileSystems API. +func (client FileStorageClient) ListFileSystems(ctx context.Context, request ListFileSystemsRequest) (response ListFileSystemsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1783,42 +2584,42 @@ func (client FileStorageClient) GetMountTarget(ctx context.Context, request GetM if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getMountTarget, policy) + ociResponse, err = common.Retry(ctx, request, client.listFileSystems, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetMountTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListFileSystemsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetMountTargetResponse{} + response = ListFileSystemsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetMountTargetResponse); ok { + if convertedResponse, ok := ociResponse.(ListFileSystemsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetMountTargetResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListFileSystemsResponse") } return } -// getMountTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getMountTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listFileSystems implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listFileSystems(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets/{mountTargetId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetMountTargetResponse + var response ListFileSystemsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/GetMountTarget" - err = common.PostProcessServiceError(err, "FileStorage", "GetMountTarget", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystemSummary/ListFileSystems" + err = common.PostProcessServiceError(err, "FileStorage", "ListFileSystems", apiReferenceLink) return response, err } @@ -1826,12 +2627,12 @@ func (client FileStorageClient) getMountTarget(ctx context.Context, request comm return response, err } -// GetOutboundConnector Gets the specified outbound connector's information. +// ListFilesystemSnapshotPolicies Lists file system snapshot policies in the specified compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetOutboundConnector.go.html to see an example of how to use GetOutboundConnector API. -func (client FileStorageClient) GetOutboundConnector(ctx context.Context, request GetOutboundConnectorRequest) (response GetOutboundConnectorResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListFilesystemSnapshotPolicies.go.html to see an example of how to use ListFilesystemSnapshotPolicies API. +func (client FileStorageClient) ListFilesystemSnapshotPolicies(ctx context.Context, request ListFilesystemSnapshotPoliciesRequest) (response ListFilesystemSnapshotPoliciesResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1840,55 +2641,55 @@ func (client FileStorageClient) GetOutboundConnector(ctx context.Context, reques if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getOutboundConnector, policy) + ociResponse, err = common.Retry(ctx, request, client.listFilesystemSnapshotPolicies, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetOutboundConnectorResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListFilesystemSnapshotPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetOutboundConnectorResponse{} + response = ListFilesystemSnapshotPoliciesResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetOutboundConnectorResponse); ok { + if convertedResponse, ok := ociResponse.(ListFilesystemSnapshotPoliciesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetOutboundConnectorResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListFilesystemSnapshotPoliciesResponse") } return } -// getOutboundConnector implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getOutboundConnector(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listFilesystemSnapshotPolicies implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listFilesystemSnapshotPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/outboundConnectors/{outboundConnectorId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/filesystemSnapshotPolicies", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetOutboundConnectorResponse + var response ListFilesystemSnapshotPoliciesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/GetOutboundConnector" - err = common.PostProcessServiceError(err, "FileStorage", "GetOutboundConnector", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicySummary/ListFilesystemSnapshotPolicies" + err = common.PostProcessServiceError(err, "FileStorage", "ListFilesystemSnapshotPolicies", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// GetReplication Gets the specified replication's information. +// ListMountTargets Lists the mount target resources in the specified compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetReplication.go.html to see an example of how to use GetReplication API. -func (client FileStorageClient) GetReplication(ctx context.Context, request GetReplicationRequest) (response GetReplicationResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListMountTargets.go.html to see an example of how to use ListMountTargets API. +func (client FileStorageClient) ListMountTargets(ctx context.Context, request ListMountTargetsRequest) (response ListMountTargetsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1897,42 +2698,42 @@ func (client FileStorageClient) GetReplication(ctx context.Context, request GetR if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getReplication, policy) + ociResponse, err = common.Retry(ctx, request, client.listMountTargets, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetReplicationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListMountTargetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetReplicationResponse{} + response = ListMountTargetsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetReplicationResponse); ok { + if convertedResponse, ok := ociResponse.(ListMountTargetsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetReplicationResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListMountTargetsResponse") } return } -// getReplication implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getReplication(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listMountTargets implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listMountTargets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/replications/{replicationId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetReplicationResponse + var response ListMountTargetsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/GetReplication" - err = common.PostProcessServiceError(err, "FileStorage", "GetReplication", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTargetSummary/ListMountTargets" + err = common.PostProcessServiceError(err, "FileStorage", "ListMountTargets", apiReferenceLink) return response, err } @@ -1940,12 +2741,28 @@ func (client FileStorageClient) getReplication(ctx context.Context, request comm return response, err } -// GetReplicationTarget Gets the specified replication target's information. +// listoutboundconnectorsummary allows to unmarshal list of polymorphic OutboundConnectorSummary +type listoutboundconnectorsummary []outboundconnectorsummary + +// UnmarshalPolymorphicJSON unmarshals polymorphic json list of items +func (m *listoutboundconnectorsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + res := make([]OutboundConnectorSummary, len(*m)) + for i, v := range *m { + nn, err := v.UnmarshalPolymorphicJSON(v.JsonData) + if err != nil { + return nil, err + } + res[i] = nn.(OutboundConnectorSummary) + } + return res, nil +} + +// ListOutboundConnectors Lists the outbound connector resources in the specified compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetReplicationTarget.go.html to see an example of how to use GetReplicationTarget API. -func (client FileStorageClient) GetReplicationTarget(ctx context.Context, request GetReplicationTargetRequest) (response GetReplicationTargetResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListOutboundConnectors.go.html to see an example of how to use ListOutboundConnectors API. +func (client FileStorageClient) ListOutboundConnectors(ctx context.Context, request ListOutboundConnectorsRequest) (response ListOutboundConnectorsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -1954,55 +2771,55 @@ func (client FileStorageClient) GetReplicationTarget(ctx context.Context, reques if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getReplicationTarget, policy) + ociResponse, err = common.Retry(ctx, request, client.listOutboundConnectors, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetReplicationTargetResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListOutboundConnectorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetReplicationTargetResponse{} + response = ListOutboundConnectorsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetReplicationTargetResponse); ok { + if convertedResponse, ok := ociResponse.(ListOutboundConnectorsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetReplicationTargetResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListOutboundConnectorsResponse") } return } -// getReplicationTarget implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getReplicationTarget(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listOutboundConnectors implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listOutboundConnectors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/replicationTargets/{replicationTargetId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/outboundConnectors", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetReplicationTargetResponse + var response ListOutboundConnectorsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTarget/GetReplicationTarget" - err = common.PostProcessServiceError(err, "FileStorage", "GetReplicationTarget", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnectorSummary/ListOutboundConnectors" + err = common.PostProcessServiceError(err, "FileStorage", "ListOutboundConnectors", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listoutboundconnectorsummary{}) return response, err } -// GetSnapshot Gets the specified snapshot's information. +// ListReplicationTargets Lists the replication target resources in the specified compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/GetSnapshot.go.html to see an example of how to use GetSnapshot API. -func (client FileStorageClient) GetSnapshot(ctx context.Context, request GetSnapshotRequest) (response GetSnapshotResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListReplicationTargets.go.html to see an example of how to use ListReplicationTargets API. +func (client FileStorageClient) ListReplicationTargets(ctx context.Context, request ListReplicationTargetsRequest) (response ListReplicationTargetsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2011,42 +2828,42 @@ func (client FileStorageClient) GetSnapshot(ctx context.Context, request GetSnap if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getSnapshot, policy) + ociResponse, err = common.Retry(ctx, request, client.listReplicationTargets, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetSnapshotResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListReplicationTargetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetSnapshotResponse{} + response = ListReplicationTargetsResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetSnapshotResponse); ok { + if convertedResponse, ok := ociResponse.(ListReplicationTargetsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetSnapshotResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListReplicationTargetsResponse") } return } -// getSnapshot implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) getSnapshot(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listReplicationTargets implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listReplicationTargets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots/{snapshotId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/replicationTargets", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetSnapshotResponse + var response ListReplicationTargetsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/GetSnapshot" - err = common.PostProcessServiceError(err, "FileStorage", "GetSnapshot", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTargetSummary/ListReplicationTargets" + err = common.PostProcessServiceError(err, "FileStorage", "ListReplicationTargets", apiReferenceLink) return response, err } @@ -2054,12 +2871,12 @@ func (client FileStorageClient) getSnapshot(ctx context.Context, request common. return response, err } -// ListExportSets Lists the export set resources in the specified compartment. +// ListReplications Lists the replication resources in the specified compartment. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListExportSets.go.html to see an example of how to use ListExportSets API. -func (client FileStorageClient) ListExportSets(ctx context.Context, request ListExportSetsRequest) (response ListExportSetsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListReplications.go.html to see an example of how to use ListReplications API. +func (client FileStorageClient) ListReplications(ctx context.Context, request ListReplicationsRequest) (response ListReplicationsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2068,42 +2885,42 @@ func (client FileStorageClient) ListExportSets(ctx context.Context, request List if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listExportSets, policy) + ociResponse, err = common.Retry(ctx, request, client.listReplications, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListExportSetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListReplicationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListExportSetsResponse{} + response = ListReplicationsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListExportSetsResponse); ok { + if convertedResponse, ok := ociResponse.(ListReplicationsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListExportSetsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListReplicationsResponse") } return } -// listExportSets implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listExportSets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listReplications implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listReplications(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exportSets", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/replications", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListExportSetsResponse + var response ListReplicationsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSetSummary/ListExportSets" - err = common.PostProcessServiceError(err, "FileStorage", "ListExportSets", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationSummary/ListReplications" + err = common.PostProcessServiceError(err, "FileStorage", "ListReplications", apiReferenceLink) return response, err } @@ -2111,14 +2928,16 @@ func (client FileStorageClient) listExportSets(ctx context.Context, request comm return response, err } -// ListExports Lists export resources by compartment, file system, or export -// set. You must specify an export set ID, a file system ID, and -// / or a compartment ID. +// ListSnapshots Lists snapshots of the specified file system, or by file system snapshot policy and compartment, +// or by file system snapshot policy and file system. +// If file system ID is not specified, a file system snapshot policy ID and compartment ID must be specified. +// Users can only sort by time created when listing snapshots by file system snapshot policy ID and compartment ID +// (sort by name is NOT supported for listing snapshots by policy and compartment). // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListExports.go.html to see an example of how to use ListExports API. -func (client FileStorageClient) ListExports(ctx context.Context, request ListExportsRequest) (response ListExportsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListSnapshots.go.html to see an example of how to use ListSnapshots API. +func (client FileStorageClient) ListSnapshots(ctx context.Context, request ListSnapshotsRequest) (response ListSnapshotsResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2127,42 +2946,42 @@ func (client FileStorageClient) ListExports(ctx context.Context, request ListExp if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listExports, policy) + ociResponse, err = common.Retry(ctx, request, client.listSnapshots, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListExportsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListSnapshotsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListExportsResponse{} + response = ListSnapshotsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListExportsResponse); ok { + if convertedResponse, ok := ociResponse.(ListSnapshotsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListExportsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListSnapshotsResponse") } return } -// listExports implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listExports(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listSnapshots implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) listSnapshots(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/exports", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListExportsResponse + var response ListSnapshotsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ExportSummary/ListExports" - err = common.PostProcessServiceError(err, "FileStorage", "ListExports", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/SnapshotSummary/ListSnapshots" + err = common.PostProcessServiceError(err, "FileStorage", "ListSnapshots", apiReferenceLink) return response, err } @@ -2170,13 +2989,16 @@ func (client FileStorageClient) listExports(ctx context.Context, request common. return response, err } -// ListFileSystems Lists the file system resources in the specified compartment, or by the specified compartment and -// file system snapshot policy. +// PauseFilesystemSnapshotPolicy This operation pauses the scheduled snapshot creation and snapshot deletion of the policy and updates the lifecycle state of the file system +// snapshot policy from ACTIVE to INACTIVE. When a file system snapshot policy is paused, file systems that are associated with the +// policy will not have scheduled snapshots created or deleted. +// If the policy is already paused, or in the INACTIVE state, you cannot pause it again. You can't pause a policy +// that is in a DELETING, DELETED, FAILED, CREATING or INACTIVE state; attempts to pause a policy in these states result in a 409 conflict error. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListFileSystems.go.html to see an example of how to use ListFileSystems API. -func (client FileStorageClient) ListFileSystems(ctx context.Context, request ListFileSystemsRequest) (response ListFileSystemsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/PauseFilesystemSnapshotPolicy.go.html to see an example of how to use PauseFilesystemSnapshotPolicy API. +func (client FileStorageClient) PauseFilesystemSnapshotPolicy(ctx context.Context, request PauseFilesystemSnapshotPolicyRequest) (response PauseFilesystemSnapshotPolicyResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2185,42 +3007,42 @@ func (client FileStorageClient) ListFileSystems(ctx context.Context, request Lis if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listFileSystems, policy) + ociResponse, err = common.Retry(ctx, request, client.pauseFilesystemSnapshotPolicy, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListFileSystemsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = PauseFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListFileSystemsResponse{} + response = PauseFilesystemSnapshotPolicyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListFileSystemsResponse); ok { + if convertedResponse, ok := ociResponse.(PauseFilesystemSnapshotPolicyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListFileSystemsResponse") + err = fmt.Errorf("failed to convert OCIResponse into PauseFilesystemSnapshotPolicyResponse") } return } -// listFileSystems implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listFileSystems(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// pauseFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) pauseFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/fileSystems", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}/actions/pause", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListFileSystemsResponse + var response PauseFilesystemSnapshotPolicyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystemSummary/ListFileSystems" - err = common.PostProcessServiceError(err, "FileStorage", "ListFileSystems", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/PauseFilesystemSnapshotPolicy" + err = common.PostProcessServiceError(err, "FileStorage", "PauseFilesystemSnapshotPolicy", apiReferenceLink) return response, err } @@ -2228,12 +3050,12 @@ func (client FileStorageClient) listFileSystems(ctx context.Context, request com return response, err } -// ListFilesystemSnapshotPolicies Lists file system snapshot policies in the specified compartment. +// RemoveExportLock Removes a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListFilesystemSnapshotPolicies.go.html to see an example of how to use ListFilesystemSnapshotPolicies API. -func (client FileStorageClient) ListFilesystemSnapshotPolicies(ctx context.Context, request ListFilesystemSnapshotPoliciesRequest) (response ListFilesystemSnapshotPoliciesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveExportLock.go.html to see an example of how to use RemoveExportLock API. +func (client FileStorageClient) RemoveExportLock(ctx context.Context, request RemoveExportLockRequest) (response RemoveExportLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2242,42 +3064,42 @@ func (client FileStorageClient) ListFilesystemSnapshotPolicies(ctx context.Conte if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listFilesystemSnapshotPolicies, policy) + ociResponse, err = common.Retry(ctx, request, client.removeExportLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListFilesystemSnapshotPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RemoveExportLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListFilesystemSnapshotPoliciesResponse{} + response = RemoveExportLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListFilesystemSnapshotPoliciesResponse); ok { + if convertedResponse, ok := ociResponse.(RemoveExportLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListFilesystemSnapshotPoliciesResponse") + err = fmt.Errorf("failed to convert OCIResponse into RemoveExportLockResponse") } return } -// listFilesystemSnapshotPolicies implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listFilesystemSnapshotPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// removeExportLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) removeExportLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/filesystemSnapshotPolicies", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/exports/{exportId}/actions/removeLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListFilesystemSnapshotPoliciesResponse + var response RemoveExportLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicySummary/ListFilesystemSnapshotPolicies" - err = common.PostProcessServiceError(err, "FileStorage", "ListFilesystemSnapshotPolicies", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Export/RemoveExportLock" + err = common.PostProcessServiceError(err, "FileStorage", "RemoveExportLock", apiReferenceLink) return response, err } @@ -2285,12 +3107,12 @@ func (client FileStorageClient) listFilesystemSnapshotPolicies(ctx context.Conte return response, err } -// ListMountTargets Lists the mount target resources in the specified compartment. +// RemoveFileSystemLock Removes a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListMountTargets.go.html to see an example of how to use ListMountTargets API. -func (client FileStorageClient) ListMountTargets(ctx context.Context, request ListMountTargetsRequest) (response ListMountTargetsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveFileSystemLock.go.html to see an example of how to use RemoveFileSystemLock API. +func (client FileStorageClient) RemoveFileSystemLock(ctx context.Context, request RemoveFileSystemLockRequest) (response RemoveFileSystemLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2299,42 +3121,42 @@ func (client FileStorageClient) ListMountTargets(ctx context.Context, request Li if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listMountTargets, policy) + ociResponse, err = common.Retry(ctx, request, client.removeFileSystemLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListMountTargetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RemoveFileSystemLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListMountTargetsResponse{} + response = RemoveFileSystemLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListMountTargetsResponse); ok { + if convertedResponse, ok := ociResponse.(RemoveFileSystemLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListMountTargetsResponse") + err = fmt.Errorf("failed to convert OCIResponse into RemoveFileSystemLockResponse") } return } -// listMountTargets implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listMountTargets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// removeFileSystemLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) removeFileSystemLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/mountTargets", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/fileSystems/{fileSystemId}/actions/removeLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListMountTargetsResponse + var response RemoveFileSystemLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTargetSummary/ListMountTargets" - err = common.PostProcessServiceError(err, "FileStorage", "ListMountTargets", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FileSystem/RemoveFileSystemLock" + err = common.PostProcessServiceError(err, "FileStorage", "RemoveFileSystemLock", apiReferenceLink) return response, err } @@ -2342,28 +3164,12 @@ func (client FileStorageClient) listMountTargets(ctx context.Context, request co return response, err } -// listoutboundconnectorsummary allows to unmarshal list of polymorphic OutboundConnectorSummary -type listoutboundconnectorsummary []outboundconnectorsummary - -// UnmarshalPolymorphicJSON unmarshals polymorphic json list of items -func (m *listoutboundconnectorsummary) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { - res := make([]OutboundConnectorSummary, len(*m)) - for i, v := range *m { - nn, err := v.UnmarshalPolymorphicJSON(v.JsonData) - if err != nil { - return nil, err - } - res[i] = nn.(OutboundConnectorSummary) - } - return res, nil -} - -// ListOutboundConnectors Lists the outbound connector resources in the specified compartment. +// RemoveFilesystemSnapshotPolicyLock Removes a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListOutboundConnectors.go.html to see an example of how to use ListOutboundConnectors API. -func (client FileStorageClient) ListOutboundConnectors(ctx context.Context, request ListOutboundConnectorsRequest) (response ListOutboundConnectorsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveFilesystemSnapshotPolicyLock.go.html to see an example of how to use RemoveFilesystemSnapshotPolicyLock API. +func (client FileStorageClient) RemoveFilesystemSnapshotPolicyLock(ctx context.Context, request RemoveFilesystemSnapshotPolicyLockRequest) (response RemoveFilesystemSnapshotPolicyLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2372,55 +3178,55 @@ func (client FileStorageClient) ListOutboundConnectors(ctx context.Context, requ if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOutboundConnectors, policy) + ociResponse, err = common.Retry(ctx, request, client.removeFilesystemSnapshotPolicyLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListOutboundConnectorsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RemoveFilesystemSnapshotPolicyLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOutboundConnectorsResponse{} + response = RemoveFilesystemSnapshotPolicyLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOutboundConnectorsResponse); ok { + if convertedResponse, ok := ociResponse.(RemoveFilesystemSnapshotPolicyLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOutboundConnectorsResponse") + err = fmt.Errorf("failed to convert OCIResponse into RemoveFilesystemSnapshotPolicyLockResponse") } return } -// listOutboundConnectors implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listOutboundConnectors(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// removeFilesystemSnapshotPolicyLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) removeFilesystemSnapshotPolicyLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/outboundConnectors", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}/actions/removeLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOutboundConnectorsResponse + var response RemoveFilesystemSnapshotPolicyLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnectorSummary/ListOutboundConnectors" - err = common.PostProcessServiceError(err, "FileStorage", "ListOutboundConnectors", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/RemoveFilesystemSnapshotPolicyLock" + err = common.PostProcessServiceError(err, "FileStorage", "RemoveFilesystemSnapshotPolicyLock", apiReferenceLink) return response, err } - err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &listoutboundconnectorsummary{}) + err = common.UnmarshalResponse(httpResponse, &response) return response, err } -// ListReplicationTargets Lists the replication target resources in the specified compartment. +// RemoveMountTargetLock Removes a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListReplicationTargets.go.html to see an example of how to use ListReplicationTargets API. -func (client FileStorageClient) ListReplicationTargets(ctx context.Context, request ListReplicationTargetsRequest) (response ListReplicationTargetsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveMountTargetLock.go.html to see an example of how to use RemoveMountTargetLock API. +func (client FileStorageClient) RemoveMountTargetLock(ctx context.Context, request RemoveMountTargetLockRequest) (response RemoveMountTargetLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2429,42 +3235,42 @@ func (client FileStorageClient) ListReplicationTargets(ctx context.Context, requ if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listReplicationTargets, policy) + ociResponse, err = common.Retry(ctx, request, client.removeMountTargetLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListReplicationTargetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RemoveMountTargetLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListReplicationTargetsResponse{} + response = RemoveMountTargetLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListReplicationTargetsResponse); ok { + if convertedResponse, ok := ociResponse.(RemoveMountTargetLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListReplicationTargetsResponse") + err = fmt.Errorf("failed to convert OCIResponse into RemoveMountTargetLockResponse") } return } -// listReplicationTargets implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listReplicationTargets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// removeMountTargetLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) removeMountTargetLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/replicationTargets", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/mountTargets/{mountTargetId}/actions/removeLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListReplicationTargetsResponse + var response RemoveMountTargetLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationTargetSummary/ListReplicationTargets" - err = common.PostProcessServiceError(err, "FileStorage", "ListReplicationTargets", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/MountTarget/RemoveMountTargetLock" + err = common.PostProcessServiceError(err, "FileStorage", "RemoveMountTargetLock", apiReferenceLink) return response, err } @@ -2472,12 +3278,12 @@ func (client FileStorageClient) listReplicationTargets(ctx context.Context, requ return response, err } -// ListReplications Lists the replication resources in the specified compartment. +// RemoveOutboundConnectorLock Removes a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListReplications.go.html to see an example of how to use ListReplications API. -func (client FileStorageClient) ListReplications(ctx context.Context, request ListReplicationsRequest) (response ListReplicationsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveOutboundConnectorLock.go.html to see an example of how to use RemoveOutboundConnectorLock API. +func (client FileStorageClient) RemoveOutboundConnectorLock(ctx context.Context, request RemoveOutboundConnectorLockRequest) (response RemoveOutboundConnectorLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2486,59 +3292,55 @@ func (client FileStorageClient) ListReplications(ctx context.Context, request Li if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listReplications, policy) + ociResponse, err = common.Retry(ctx, request, client.removeOutboundConnectorLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListReplicationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RemoveOutboundConnectorLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListReplicationsResponse{} + response = RemoveOutboundConnectorLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListReplicationsResponse); ok { + if convertedResponse, ok := ociResponse.(RemoveOutboundConnectorLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListReplicationsResponse") + err = fmt.Errorf("failed to convert OCIResponse into RemoveOutboundConnectorLockResponse") } return } -// listReplications implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listReplications(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// removeOutboundConnectorLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) removeOutboundConnectorLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/replications", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/outboundConnectors/{outboundConnectorId}/actions/removeLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListReplicationsResponse + var response RemoveOutboundConnectorLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/ReplicationSummary/ListReplications" - err = common.PostProcessServiceError(err, "FileStorage", "ListReplications", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/OutboundConnector/RemoveOutboundConnectorLock" + err = common.PostProcessServiceError(err, "FileStorage", "RemoveOutboundConnectorLock", apiReferenceLink) return response, err } - err = common.UnmarshalResponse(httpResponse, &response) + err = common.UnmarshalResponseWithPolymorphicBody(httpResponse, &response, &outboundconnector{}) return response, err } -// ListSnapshots Lists snapshots of the specified file system, or by file system snapshot policy and compartment, -// or by file system snapshot policy and file system. -// If file system ID is not specified, a file system snapshot policy ID and compartment ID must be specified. -// Users can only sort by time created when listing snapshots by file system snapshot policy ID and compartment ID -// (sort by name is NOT supported for listing snapshots by policy and compartment). +// RemoveReplicationLock Removes a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/ListSnapshots.go.html to see an example of how to use ListSnapshots API. -func (client FileStorageClient) ListSnapshots(ctx context.Context, request ListSnapshotsRequest) (response ListSnapshotsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveReplicationLock.go.html to see an example of how to use RemoveReplicationLock API. +func (client FileStorageClient) RemoveReplicationLock(ctx context.Context, request RemoveReplicationLockRequest) (response RemoveReplicationLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2547,42 +3349,42 @@ func (client FileStorageClient) ListSnapshots(ctx context.Context, request ListS if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listSnapshots, policy) + ociResponse, err = common.Retry(ctx, request, client.removeReplicationLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSnapshotsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RemoveReplicationLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSnapshotsResponse{} + response = RemoveReplicationLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSnapshotsResponse); ok { + if convertedResponse, ok := ociResponse.(RemoveReplicationLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSnapshotsResponse") + err = fmt.Errorf("failed to convert OCIResponse into RemoveReplicationLockResponse") } return } -// listSnapshots implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) listSnapshots(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// removeReplicationLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) removeReplicationLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/snapshots", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/replications/{replicationId}/actions/removeLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSnapshotsResponse + var response RemoveReplicationLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/SnapshotSummary/ListSnapshots" - err = common.PostProcessServiceError(err, "FileStorage", "ListSnapshots", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Replication/RemoveReplicationLock" + err = common.PostProcessServiceError(err, "FileStorage", "RemoveReplicationLock", apiReferenceLink) return response, err } @@ -2590,16 +3392,12 @@ func (client FileStorageClient) listSnapshots(ctx context.Context, request commo return response, err } -// PauseFilesystemSnapshotPolicy This operation pauses the scheduled snapshot creation and snapshot deletion of the policy and updates the lifecycle state of the file system -// snapshot policy from ACTIVE to INACTIVE. When a file system snapshot policy is paused, file systems that are associated with the -// policy will not have scheduled snapshots created or deleted. -// If the policy is already paused, or in the INACTIVE state, you cannot pause it again. You can't pause a policy -// that is in a DELETING, DELETED, FAILED, CREATING or INACTIVE state; attempts to pause a policy in these states result in a 409 conflict error. +// RemoveSnapshotLock Removes a lock to a resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/PauseFilesystemSnapshotPolicy.go.html to see an example of how to use PauseFilesystemSnapshotPolicy API. -func (client FileStorageClient) PauseFilesystemSnapshotPolicy(ctx context.Context, request PauseFilesystemSnapshotPolicyRequest) (response PauseFilesystemSnapshotPolicyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveSnapshotLock.go.html to see an example of how to use RemoveSnapshotLock API. +func (client FileStorageClient) RemoveSnapshotLock(ctx context.Context, request RemoveSnapshotLockRequest) (response RemoveSnapshotLockResponse, err error) { var ociResponse common.OCIResponse policy := common.NoRetryPolicy() if client.RetryPolicy() != nil { @@ -2608,42 +3406,42 @@ func (client FileStorageClient) PauseFilesystemSnapshotPolicy(ctx context.Contex if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.pauseFilesystemSnapshotPolicy, policy) + ociResponse, err = common.Retry(ctx, request, client.removeSnapshotLock, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = PauseFilesystemSnapshotPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = RemoveSnapshotLockResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = PauseFilesystemSnapshotPolicyResponse{} + response = RemoveSnapshotLockResponse{} } } return } - if convertedResponse, ok := ociResponse.(PauseFilesystemSnapshotPolicyResponse); ok { + if convertedResponse, ok := ociResponse.(RemoveSnapshotLockResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into PauseFilesystemSnapshotPolicyResponse") + err = fmt.Errorf("failed to convert OCIResponse into RemoveSnapshotLockResponse") } return } -// pauseFilesystemSnapshotPolicy implements the OCIOperation interface (enables retrying operations) -func (client FileStorageClient) pauseFilesystemSnapshotPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// removeSnapshotLock implements the OCIOperation interface (enables retrying operations) +func (client FileStorageClient) removeSnapshotLock(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodPost, "/filesystemSnapshotPolicies/{filesystemSnapshotPolicyId}/actions/pause", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/snapshots/{snapshotId}/actions/removeLock", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response PauseFilesystemSnapshotPolicyResponse + var response RemoveSnapshotLockResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/FilesystemSnapshotPolicy/PauseFilesystemSnapshotPolicy" - err = common.PostProcessServiceError(err, "FileStorage", "PauseFilesystemSnapshotPolicy", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/filestorage/20171215/Snapshot/RemoveSnapshotLock" + err = common.PostProcessServiceError(err, "FileStorage", "RemoveSnapshotLock", apiReferenceLink) return response, err } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy.go index 97898ea941c..3f7407aac5c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy.go @@ -53,6 +53,9 @@ type FilesystemSnapshotPolicy struct { // The list of associated snapshot schedules. A maximum of 10 schedules can be associated with a policy. Schedules []SnapshotSchedule `mandatory:"false" json:"schedules"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy_summary.go index 188b892f27a..e71c3268fda 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/filesystem_snapshot_policy_summary.go @@ -42,6 +42,9 @@ type FilesystemSnapshotPolicySummary struct { // Example: `My Filesystem Snapshot Policy` DisplayName *string `mandatory:"false" json:"displayName"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // The prefix to apply to all snapshots created by this policy. // Example: `acme` PolicyPrefix *string `mandatory:"false" json:"policyPrefix"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go index 3668e1fe400..ff6dab21332 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account.go @@ -47,6 +47,9 @@ type LdapBindAccount struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -98,6 +101,11 @@ func (m LdapBindAccount) GetTimeCreated() *common.SDKTime { return m.TimeCreated } +// GetLocks returns Locks +func (m LdapBindAccount) GetLocks() []ResourceLock { + return m.Locks +} + // GetFreeformTags returns FreeformTags func (m LdapBindAccount) GetFreeformTags() map[string]string { return m.FreeformTags diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go index 6bfd4872323..32dff3d6f78 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/ldap_bind_account_summary.go @@ -47,6 +47,9 @@ type LdapBindAccountSummary struct { // Example: `Uocm:PHX-AD-1` AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -92,6 +95,11 @@ func (m LdapBindAccountSummary) GetTimeCreated() *common.SDKTime { return m.TimeCreated } +// GetLocks returns Locks +func (m LdapBindAccountSummary) GetLocks() []ResourceLock { + return m.Locks +} + // GetFreeformTags returns FreeformTags func (m LdapBindAccountSummary) GetFreeformTags() map[string]string { return m.FreeformTags diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go index b447aa8813a..ea4973ae800 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target.go @@ -88,6 +88,9 @@ type MountTarget struct { // of mount target. Value is listed at Mount Target Performance (https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). ReservedStorageCapacity *int64 `mandatory:"false" json:"reservedStorageCapacity"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target_summary.go index 38a39b823d7..1e2ce1dd606 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/mount_target_summary.go @@ -77,6 +77,9 @@ type MountTargetSummary struct { // of mount target. Value is listed at Mount Target Performance (https://docs.oracle.com/iaas/Content/File/Tasks/managingmounttargets.htm#performance). ReservedStorageCapacity *int64 `mandatory:"false" json:"reservedStorageCapacity"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go index cd648ae68ea..feb2cc80653 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector.go @@ -45,6 +45,9 @@ type OutboundConnector interface { // Example: `Uocm:PHX-AD-1` GetAvailabilityDomain() *string + // Locks associated with this resource. + GetLocks() []ResourceLock + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -60,6 +63,7 @@ type OutboundConnector interface { type outboundconnector struct { JsonData []byte AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + Locks []ResourceLock `mandatory:"false" json:"locks"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -87,6 +91,7 @@ func (m *outboundconnector) UnmarshalJSON(data []byte) error { m.DisplayName = s.Model.DisplayName m.TimeCreated = s.Model.TimeCreated m.AvailabilityDomain = s.Model.AvailabilityDomain + m.Locks = s.Model.Locks m.FreeformTags = s.Model.FreeformTags m.DefinedTags = s.Model.DefinedTags m.ConnectorType = s.Model.ConnectorType @@ -118,6 +123,11 @@ func (m outboundconnector) GetAvailabilityDomain() *string { return m.AvailabilityDomain } +// GetLocks returns Locks +func (m outboundconnector) GetLocks() []ResourceLock { + return m.Locks +} + // GetFreeformTags returns FreeformTags func (m outboundconnector) GetFreeformTags() map[string]string { return m.FreeformTags diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go index 708d7ffbb3f..4e99ad99eb4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/outbound_connector_summary.go @@ -44,6 +44,9 @@ type OutboundConnectorSummary interface { // Example: `Uocm:PHX-AD-1` GetAvailabilityDomain() *string + // Locks associated with this resource. + GetLocks() []ResourceLock + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). @@ -59,6 +62,7 @@ type OutboundConnectorSummary interface { type outboundconnectorsummary struct { JsonData []byte AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` + Locks []ResourceLock `mandatory:"false" json:"locks"` FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` CompartmentId *string `mandatory:"true" json:"compartmentId"` @@ -86,6 +90,7 @@ func (m *outboundconnectorsummary) UnmarshalJSON(data []byte) error { m.DisplayName = s.Model.DisplayName m.TimeCreated = s.Model.TimeCreated m.AvailabilityDomain = s.Model.AvailabilityDomain + m.Locks = s.Model.Locks m.FreeformTags = s.Model.FreeformTags m.DefinedTags = s.Model.DefinedTags m.ConnectorType = s.Model.ConnectorType @@ -117,6 +122,11 @@ func (m outboundconnectorsummary) GetAvailabilityDomain() *string { return m.AvailabilityDomain } +// GetLocks returns Locks +func (m outboundconnectorsummary) GetLocks() []ResourceLock { + return m.Locks +} + // GetFreeformTags returns FreeformTags func (m outboundconnectorsummary) GetFreeformTags() map[string]string { return m.FreeformTags diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/pause_filesystem_snapshot_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/pause_filesystem_snapshot_policy_request_response.go index 49b8616d4c3..ed055a261b1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/pause_filesystem_snapshot_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/pause_filesystem_snapshot_policy_request_response.go @@ -32,6 +32,9 @@ type PauseFilesystemSnapshotPolicyRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_export_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_export_lock_request_response.go new file mode 100644 index 00000000000..9eb7c4c5789 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_export_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveExportLockRequest wrapper for the RemoveExportLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveExportLock.go.html to see an example of how to use RemoveExportLockRequest. +type RemoveExportLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the export. + ExportId *string `mandatory:"true" contributesTo:"path" name:"exportId"` + + // The details to be updated for the RemoveLock. + RemoveExportLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveExportLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveExportLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveExportLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveExportLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveExportLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveExportLockResponse wrapper for the RemoveExportLock operation +type RemoveExportLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Export instance + Export `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveExportLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveExportLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_file_system_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_file_system_lock_request_response.go new file mode 100644 index 00000000000..ca3ebc5e435 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_file_system_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveFileSystemLockRequest wrapper for the RemoveFileSystemLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveFileSystemLock.go.html to see an example of how to use RemoveFileSystemLockRequest. +type RemoveFileSystemLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system. + FileSystemId *string `mandatory:"true" contributesTo:"path" name:"fileSystemId"` + + // The details to be updated for the RemoveLock. + RemoveFileSystemLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveFileSystemLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveFileSystemLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveFileSystemLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveFileSystemLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveFileSystemLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveFileSystemLockResponse wrapper for the RemoveFileSystemLock operation +type RemoveFileSystemLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FileSystem instance + FileSystem `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveFileSystemLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveFileSystemLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_filesystem_snapshot_policy_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_filesystem_snapshot_policy_lock_request_response.go new file mode 100644 index 00000000000..5cb3d00bd89 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_filesystem_snapshot_policy_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveFilesystemSnapshotPolicyLockRequest wrapper for the RemoveFilesystemSnapshotPolicyLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveFilesystemSnapshotPolicyLock.go.html to see an example of how to use RemoveFilesystemSnapshotPolicyLockRequest. +type RemoveFilesystemSnapshotPolicyLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the file system snapshot policy. + FilesystemSnapshotPolicyId *string `mandatory:"true" contributesTo:"path" name:"filesystemSnapshotPolicyId"` + + // The details to be updated for the RemoveLock. + RemoveFilesystemSnapshotPolicyLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveFilesystemSnapshotPolicyLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveFilesystemSnapshotPolicyLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveFilesystemSnapshotPolicyLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveFilesystemSnapshotPolicyLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveFilesystemSnapshotPolicyLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveFilesystemSnapshotPolicyLockResponse wrapper for the RemoveFilesystemSnapshotPolicyLock operation +type RemoveFilesystemSnapshotPolicyLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The FilesystemSnapshotPolicy instance + FilesystemSnapshotPolicy `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveFilesystemSnapshotPolicyLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveFilesystemSnapshotPolicyLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_mount_target_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_mount_target_lock_request_response.go new file mode 100644 index 00000000000..d2a42041755 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_mount_target_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveMountTargetLockRequest wrapper for the RemoveMountTargetLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveMountTargetLock.go.html to see an example of how to use RemoveMountTargetLockRequest. +type RemoveMountTargetLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the mount target. + MountTargetId *string `mandatory:"true" contributesTo:"path" name:"mountTargetId"` + + // The details to be updated for the RemoveLock. + RemoveMountTargetLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveMountTargetLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveMountTargetLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveMountTargetLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveMountTargetLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveMountTargetLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveMountTargetLockResponse wrapper for the RemoveMountTargetLock operation +type RemoveMountTargetLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The MountTarget instance + MountTarget `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveMountTargetLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveMountTargetLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_outbound_connector_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_outbound_connector_lock_request_response.go new file mode 100644 index 00000000000..b6693a29a75 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_outbound_connector_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveOutboundConnectorLockRequest wrapper for the RemoveOutboundConnectorLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveOutboundConnectorLock.go.html to see an example of how to use RemoveOutboundConnectorLockRequest. +type RemoveOutboundConnectorLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the outbound connector. + OutboundConnectorId *string `mandatory:"true" contributesTo:"path" name:"outboundConnectorId"` + + // The details to be updated for the RemoveLock. + RemoveOutboundConnectorLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveOutboundConnectorLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveOutboundConnectorLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveOutboundConnectorLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveOutboundConnectorLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveOutboundConnectorLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveOutboundConnectorLockResponse wrapper for the RemoveOutboundConnectorLock operation +type RemoveOutboundConnectorLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The OutboundConnector instance + OutboundConnector `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveOutboundConnectorLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveOutboundConnectorLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_replication_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_replication_lock_request_response.go new file mode 100644 index 00000000000..cc4b29ac48d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_replication_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveReplicationLockRequest wrapper for the RemoveReplicationLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveReplicationLock.go.html to see an example of how to use RemoveReplicationLockRequest. +type RemoveReplicationLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the replication. + ReplicationId *string `mandatory:"true" contributesTo:"path" name:"replicationId"` + + // The details to be updated for the RemoveLock. + RemoveReplicationLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveReplicationLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveReplicationLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveReplicationLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveReplicationLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveReplicationLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveReplicationLockResponse wrapper for the RemoveReplicationLock operation +type RemoveReplicationLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Replication instance + Replication `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveReplicationLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveReplicationLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_snapshot_lock_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_snapshot_lock_request_response.go new file mode 100644 index 00000000000..64e3626df21 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/remove_snapshot_lock_request_response.go @@ -0,0 +1,105 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// RemoveSnapshotLockRequest wrapper for the RemoveSnapshotLock operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/filestorage/RemoveSnapshotLock.go.html to see an example of how to use RemoveSnapshotLockRequest. +type RemoveSnapshotLockRequest struct { + + // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the snapshot. + SnapshotId *string `mandatory:"true" contributesTo:"path" name:"snapshotId"` + + // The details to be updated for the RemoveLock. + RemoveSnapshotLockDetails ResourceLock `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // Unique identifier for the request. + // If you need to contact Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request RemoveSnapshotLockRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request RemoveSnapshotLockRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request RemoveSnapshotLockRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request RemoveSnapshotLockRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request RemoveSnapshotLockRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RemoveSnapshotLockResponse wrapper for the RemoveSnapshotLock operation +type RemoveSnapshotLockResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Snapshot instance + Snapshot `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If + // you need to contact Oracle about a particular request, + // please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response RemoveSnapshotLockResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response RemoveSnapshotLockResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication.go index 6a066e1a90b..612c367e67b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication.go @@ -77,6 +77,9 @@ type Replication struct { // Percentage progress of the current replication cycle. DeltaProgress *int64 `mandatory:"false" json:"deltaProgress"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication_summary.go index 5adef4a3620..5504f28c75e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/replication_summary.go @@ -43,6 +43,9 @@ type ReplicationSummary struct { // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the replication. CompartmentId *string `mandatory:"false" json:"compartmentId"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Duration in minutes between replication snapshots. ReplicationInterval *int64 `mandatory:"false" json:"replicationInterval"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/resource_lock.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/resource_lock.go new file mode 100644 index 00000000000..36a36b7adfa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/resource_lock.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// File Storage API +// +// Use the File Storage service API to manage file systems, mount targets, and snapshots. +// For more information, see Overview of File Storage (https://docs.cloud.oracle.com/iaas/Content/File/Concepts/filestorageoverview.htm). +// + +package filestorage + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResourceLock Resource locks are used to prevent certain APIs from being called for the resource. +// A full lock prevents both updating the resource and deleting the resource. A delete +// lock prevents deleting the resource. +type ResourceLock struct { + + // Type of the lock. + Type ResourceLockTypeEnum `mandatory:"true" json:"type"` + + // The ID of the resource that is locking this resource. Indicates that deleting this resource will remove the lock. + RelatedResourceId *string `mandatory:"false" json:"relatedResourceId"` + + // A message added by the creator of the lock. This is typically used to give an + // indication of why the resource is locked. + Message *string `mandatory:"false" json:"message"` + + // When the lock was created. + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` +} + +func (m ResourceLock) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ResourceLock) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingResourceLockTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetResourceLockTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ResourceLockTypeEnum Enum with underlying type: string +type ResourceLockTypeEnum string + +// Set of constants representing the allowable values for ResourceLockTypeEnum +const ( + ResourceLockTypeFull ResourceLockTypeEnum = "FULL" + ResourceLockTypeDelete ResourceLockTypeEnum = "DELETE" +) + +var mappingResourceLockTypeEnum = map[string]ResourceLockTypeEnum{ + "FULL": ResourceLockTypeFull, + "DELETE": ResourceLockTypeDelete, +} + +var mappingResourceLockTypeEnumLowerCase = map[string]ResourceLockTypeEnum{ + "full": ResourceLockTypeFull, + "delete": ResourceLockTypeDelete, +} + +// GetResourceLockTypeEnumValues Enumerates the set of values for ResourceLockTypeEnum +func GetResourceLockTypeEnumValues() []ResourceLockTypeEnum { + values := make([]ResourceLockTypeEnum, 0) + for _, v := range mappingResourceLockTypeEnum { + values = append(values, v) + } + return values +} + +// GetResourceLockTypeEnumStringValues Enumerates the set of values in String for ResourceLockTypeEnum +func GetResourceLockTypeEnumStringValues() []string { + return []string{ + "FULL", + "DELETE", + } +} + +// GetMappingResourceLockTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingResourceLockTypeEnum(val string) (ResourceLockTypeEnum, bool) { + enum, ok := mappingResourceLockTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot.go index 509fdd4e094..ca62c6f2df7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot.go @@ -65,6 +65,9 @@ type Snapshot struct { // Additional information about the current `lifecycleState`. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Free-form tags for this resource. Each tag is a simple key-value pair // with no predefined name, type, or namespace. // For more information, see Resource Tags (https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot_summary.go index 2aab856e8dd..a25e1283067 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/snapshot_summary.go @@ -38,6 +38,9 @@ type SnapshotSummary struct { // Example: `2016-08-25T21:10:29.600Z` TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + // Locks associated with this resource. + Locks []ResourceLock `mandatory:"false" json:"locks"` + // Specifies the generation type of the snapshot. SnapshotType SnapshotSummarySnapshotTypeEnum `mandatory:"false" json:"snapshotType,omitempty"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/unpause_filesystem_snapshot_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/unpause_filesystem_snapshot_policy_request_response.go index 9fabb1cd490..407ad8c1337 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/unpause_filesystem_snapshot_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/unpause_filesystem_snapshot_policy_request_response.go @@ -32,6 +32,9 @@ type UnpauseFilesystemSnapshotPolicyRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_request_response.go index d3d7845ce45..6e44994da2a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_export_request_response.go @@ -35,6 +35,9 @@ type UpdateExportRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_file_system_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_file_system_request_response.go index 478252d470b..e09c5aa108f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_file_system_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_file_system_request_response.go @@ -35,6 +35,9 @@ type UpdateFileSystemRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_filesystem_snapshot_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_filesystem_snapshot_policy_request_response.go index bbcbf9a37e0..d3d09bc8551 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_filesystem_snapshot_policy_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_filesystem_snapshot_policy_request_response.go @@ -35,6 +35,9 @@ type UpdateFilesystemSnapshotPolicyRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_request_response.go index ea891bc300b..3eae72f8854 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_mount_target_request_response.go @@ -35,6 +35,9 @@ type UpdateMountTargetRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go index 9285de346c2..66fbb7ca421 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_outbound_connector_request_response.go @@ -35,6 +35,9 @@ type UpdateOutboundConnectorRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_replication_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_replication_request_response.go index 11f681cda52..8cc15818f5b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_replication_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_replication_request_response.go @@ -35,6 +35,9 @@ type UpdateReplicationRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_snapshot_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_snapshot_request_response.go index ae10d485f85..cf958813b8c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_snapshot_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/filestorage/update_snapshot_request_response.go @@ -35,6 +35,9 @@ type UpdateSnapshotRequest struct { // If you need to contact Oracle about a particular request, please provide the request ID. OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + // Whether to override locks (if any exist). + IsLockOverride *bool `mandatory:"false" contributesTo:"query" name:"isLockOverride"` + // Metadata about the request. This information will not be transmitted to the service, but // represents information that the SDK will consume to drive retry behavior. RequestMetadata common.RequestMetadata diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group.go index 2d8a10b4848..58a2e45f6b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -19,7 +18,7 @@ import ( // ActionGroup Action Group. type ActionGroup struct { - // Provide the ID of the resource; Ex- fleetId. + // Provide the ID of the resource. Example fleet ID. ResourceId *string `mandatory:"true" json:"resourceId"` // ID of the runbook diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_based_user_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_based_user_action_details.go new file mode 100644 index 00000000000..3bc4e611c85 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_based_user_action_details.go @@ -0,0 +1,65 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ActionGroupBasedUserActionDetails Details for a user action to be performed on an action group. +type ActionGroupBasedUserActionDetails struct { + + // Unique identifier for the action group. + ActionGroupId *string `mandatory:"true" json:"actionGroupId"` + + // Action to be Performed. + Action UserActionDetailsActionEnum `mandatory:"true" json:"action"` +} + +// GetAction returns Action +func (m ActionGroupBasedUserActionDetails) GetAction() UserActionDetailsActionEnum { + return m.Action +} + +func (m ActionGroupBasedUserActionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ActionGroupBasedUserActionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUserActionDetailsActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetUserActionDetailsActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ActionGroupBasedUserActionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeActionGroupBasedUserActionDetails ActionGroupBasedUserActionDetails + s := struct { + DiscriminatorParam string `json:"level"` + MarshalTypeActionGroupBasedUserActionDetails + }{ + "ACTION_GROUP", + (MarshalTypeActionGroupBasedUserActionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_details.go index 41672a41532..224842cc9ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_group_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,14 +15,14 @@ import ( "strings" ) -// ActionGroupDetails Action Group. +// ActionGroupDetails Action Group details. type ActionGroupDetails struct { - // The ID of the ActionGroup resource . + // The ID of the ActionGroup resource. // Ex:fleetId. ResourceId *string `mandatory:"true" json:"resourceId"` - // ID of the runbook + // OCID of the runbook. RunbookId *string `mandatory:"true" json:"runbookId"` // Name of the ActionGroup. @@ -40,19 +39,19 @@ type ActionGroupDetails struct { // Only applicable if actionGroup type is PRODUCT. Product *string `mandatory:"false" json:"product"` - // LifeCycle Operation + // LifeCycle Operation. LifecycleOperation *string `mandatory:"false" json:"lifecycleOperation"` // Unique producer Id at Action Group Level ActivityId *string `mandatory:"false" json:"activityId"` - // Status of the Job at Action Group Level + // Status of the Job at Action Group Level. Status JobStatusEnum `mandatory:"false" json:"status,omitempty"` - // The time the the Scheduler Job started. An RFC3339 formatted datetime string + // The time the Scheduler Job started. An RFC3339 formatted datetime string. TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - // The time the Scheduler Job ended. An RFC3339 formatted datetime string + // The time the Scheduler Job ended. An RFC3339 formatted datetime string. TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_type.go index 12800a10a02..8a55230a21d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/action_type.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/activity_resource_target.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/activity_resource_target.go index f22d71f902a..aecd0a08428 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/activity_resource_target.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/activity_resource_target.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -22,8 +21,12 @@ type ActivityResourceTarget struct { // Target Name. TargetName *string `mandatory:"true" json:"targetName"` - // Status of the Job at Resource Target Level. + // Status of the Job at target Level. Status JobStatusEnum `mandatory:"false" json:"status,omitempty"` + + // Description of the Execution status. + // If there are any errors, this can also include a short error message. + Description *string `mandatory:"false" json:"description"` } func (m ActivityResourceTarget) String() string { diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_collection.go index b82eae86e12..242a8fdeca1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// AnnouncementCollection Results of list announcements . Contains AnnouncementSummary items +// AnnouncementCollection Results of list announcements. Contains AnnouncementSummary items. type AnnouncementCollection struct { // List of AnnouncementSummary items diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_sort_by.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_sort_by.go index 58104db6ec3..c345a9ceed5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_sort_by.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_sort_by.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_summary.go index c3aa9de7f28..776d9af48b4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/announcement_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// AnnouncementSummary An summary of announcements for Fleet Application Management Service +// AnnouncementSummary A summary of announcements for Fleet Application Management. type AnnouncementSummary struct { // The OCID of the resource. @@ -25,16 +24,16 @@ type AnnouncementSummary struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Type of announcement + // Type of announcement. Type *string `mandatory:"true" json:"type"` - // Summary of the announcement + // Summary of the announcement. Summary *string `mandatory:"true" json:"summary"` - // Date to start displaying announcement to user + // Announcement start date. AnnouncementStart *common.SDKTime `mandatory:"true" json:"announcementStart"` - // Date to end displaying annonucement to user + // Announcement end date AnnouncementEnd *common.SDKTime `mandatory:"true" json:"announcementEnd"` // Associated region @@ -55,10 +54,10 @@ type AnnouncementSummary struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Details of the announcement + // Announcement Details. Details *string `mandatory:"false" json:"details"` - // URL to the announcement + // URL to the announcement. Url *string `mandatory:"false" json:"url"` // The lifecycle state of the announcement. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/api_based_execution_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/api_based_execution_details.go index d4ac5ae67b7..9babc938e4b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/api_based_execution_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/api_based_execution_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,7 @@ import ( "strings" ) -// ApiBasedExecutionDetails Details for API based execution +// ApiBasedExecutionDetails Details for API-based execution. type ApiBasedExecutionDetails struct { // Endpoint to be invoked. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/artifact_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/artifact_details.go new file mode 100644 index 00000000000..79c8c9b46d2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/artifact_details.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ArtifactDetails Patch artifact description and content details. +type ArtifactDetails interface { +} + +type artifactdetails struct { + JsonData []byte + Category string `json:"category"` +} + +// UnmarshalJSON unmarshals json +func (m *artifactdetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerartifactdetails artifactdetails + s := struct { + Model Unmarshalerartifactdetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Category = s.Model.Category + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *artifactdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Category { + case "PLATFORM_SPECIFIC": + mm := PlatformSpecificArtifactDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "GENERIC": + mm := GenericArtifactDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ArtifactDetails: %s.", m.Category) + return *m, nil + } +} + +func (m artifactdetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m artifactdetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ArtifactDetailsCategoryEnum Enum with underlying type: string +type ArtifactDetailsCategoryEnum string + +// Set of constants representing the allowable values for ArtifactDetailsCategoryEnum +const ( + ArtifactDetailsCategoryGeneric ArtifactDetailsCategoryEnum = "GENERIC" + ArtifactDetailsCategoryPlatformSpecific ArtifactDetailsCategoryEnum = "PLATFORM_SPECIFIC" +) + +var mappingArtifactDetailsCategoryEnum = map[string]ArtifactDetailsCategoryEnum{ + "GENERIC": ArtifactDetailsCategoryGeneric, + "PLATFORM_SPECIFIC": ArtifactDetailsCategoryPlatformSpecific, +} + +var mappingArtifactDetailsCategoryEnumLowerCase = map[string]ArtifactDetailsCategoryEnum{ + "generic": ArtifactDetailsCategoryGeneric, + "platform_specific": ArtifactDetailsCategoryPlatformSpecific, +} + +// GetArtifactDetailsCategoryEnumValues Enumerates the set of values for ArtifactDetailsCategoryEnum +func GetArtifactDetailsCategoryEnumValues() []ArtifactDetailsCategoryEnum { + values := make([]ArtifactDetailsCategoryEnum, 0) + for _, v := range mappingArtifactDetailsCategoryEnum { + values = append(values, v) + } + return values +} + +// GetArtifactDetailsCategoryEnumStringValues Enumerates the set of values in String for ArtifactDetailsCategoryEnum +func GetArtifactDetailsCategoryEnumStringValues() []string { + return []string{ + "GENERIC", + "PLATFORM_SPECIFIC", + } +} + +// GetMappingArtifactDetailsCategoryEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingArtifactDetailsCategoryEnum(val string) (ArtifactDetailsCategoryEnum, bool) { + enum, ok := mappingArtifactDetailsCategoryEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_credential_details.go index 3dcf0bd0d97..00750248401 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_credential_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,7 @@ import ( "strings" ) -// AssociatedFleetCredentialDetails The information about new FleetCredential. +// AssociatedFleetCredentialDetails The information about associated FleetCredential. type AssociatedFleetCredentialDetails struct { // A user-friendly name. Does not have to be unique, and it's changeable. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_property_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_property_details.go index 1ce98c8beb6..866257a3733 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_property_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_property_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// AssociatedFleetPropertyDetails The information about new FleetProperty. +// AssociatedFleetPropertyDetails The information about associated FleetProperty. type AssociatedFleetPropertyDetails struct { // Tenancy OCID @@ -30,10 +29,10 @@ type AssociatedFleetPropertyDetails struct { // Example: `My new resource` DisplayName *string `mandatory:"false" json:"displayName"` - // Value of the Property + // Value of the Property. Value *string `mandatory:"false" json:"value"` - // Property is required or not + // Property is required or not. IsRequired *bool `mandatory:"false" json:"isRequired"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_resource_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_resource_details.go index c59f612f426..b2936250966 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_resource_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_fleet_resource_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -19,13 +18,13 @@ import ( // AssociatedFleetResourceDetails The information about associated FleetResource. type AssociatedFleetResourceDetails struct { - // OCID of the reosurce. + // OCID of the resource. ResourceId *string `mandatory:"true" json:"resourceId"` - // Compartment Identifier. + // Compartment Identifier[OCID]. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Tenancy Identifier. + // Tenancy Identifier[OCID]. TenancyId *string `mandatory:"true" json:"tenancyId"` // Type of the FleetResource. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_local_task_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_local_task_details.go index fd9b5c9293b..94a1c0b39f2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_local_task_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_local_task_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,8 @@ import ( "strings" ) -// AssociatedLocalTaskDetails The details of the task. +// AssociatedLocalTaskDetails The details of the local task. +// The local tasks are specific to a single runbook. type AssociatedLocalTaskDetails struct { ExecutionDetails ExecutionDetails `mandatory:"true" json:"executionDetails"` @@ -32,6 +32,12 @@ type AssociatedLocalTaskDetails struct { Properties *Properties `mandatory:"false" json:"properties"` + // Is this a discovery output task? + IsDiscoveryOutputTask *bool `mandatory:"false" json:"isDiscoveryOutputTask"` + + // Is this an Apply Subject Task? Ex. Patch Execution Task + IsApplySubjectTask *bool `mandatory:"false" json:"isApplySubjectTask"` + // The name of the task Name *string `mandatory:"false" json:"name"` @@ -79,6 +85,8 @@ func (m *AssociatedLocalTaskDetails) UnmarshalJSON(data []byte) (e error) { Platform *string `json:"platform"` IsCopyToLibraryEnabled *bool `json:"isCopyToLibraryEnabled"` Properties *Properties `json:"properties"` + IsDiscoveryOutputTask *bool `json:"isDiscoveryOutputTask"` + IsApplySubjectTask *bool `json:"isApplySubjectTask"` Name *string `json:"name"` ExecutionDetails executiondetails `json:"executionDetails"` OsType OsTypeEnum `json:"osType"` @@ -97,6 +105,10 @@ func (m *AssociatedLocalTaskDetails) UnmarshalJSON(data []byte) (e error) { m.Properties = model.Properties + m.IsDiscoveryOutputTask = model.IsDiscoveryOutputTask + + m.IsApplySubjectTask = model.IsApplySubjectTask + m.Name = model.Name nn, e = model.ExecutionDetails.UnmarshalPolymorphicJSON(model.ExecutionDetails.JsonData) diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_scheduler_definition.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_scheduler_definition.go index 9d15059a138..22fe22d4fd4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_scheduler_definition.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_scheduler_definition.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// AssociatedSchedulerDefinition Associated SchedulerDefinition with the job. +// AssociatedSchedulerDefinition SchedulerDefinition associated with the job. type AssociatedSchedulerDefinition struct { // The OCID of the resource. @@ -30,7 +29,7 @@ type AssociatedSchedulerDefinition struct { // OCID of the tenancy to which the resource belongs to. TenancyId *string `mandatory:"true" json:"tenancyId"` - // Is this recurring schedule? + // Is this a recurring schedule? IsRecurring *bool `mandatory:"true" json:"isRecurring"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_shared_task_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_shared_task_details.go index 6e13f86b8f4..163c8d2876f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_shared_task_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_shared_task_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,8 @@ import ( "strings" ) -// AssociatedSharedTaskDetails The details of the task. +// AssociatedSharedTaskDetails The details of the shared task. +// Tasks that are part of the task library and can be reused across runbooks. type AssociatedSharedTaskDetails struct { // The ID of taskRecord. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_task_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_task_details.go index c346ff7a83f..3fc48e7d111 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_task_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associated_task_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associations.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associations.go index b7860db3e73..67e04ef9992 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associations.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/associations.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,17 +15,19 @@ import ( "strings" ) -// Associations JSON content with required associations +// Associations Associations for the runbook. type Associations struct { - // A set of tasks to execute in the runbook + // A set of tasks to execute in the runbook. Tasks []Task `mandatory:"true" json:"tasks"` - // The groups of the runbook + // The groups of the runbook. Groups []Group `mandatory:"true" json:"groups"` ExecutionWorkflowDetails *ExecutionWorkflowDetails `mandatory:"true" json:"executionWorkflowDetails"` + RollbackWorkflowDetails *RollbackWorkflowDetails `mandatory:"false" json:"rollbackWorkflowDetails"` + // The version of the runbook. Version *string `mandatory:"false" json:"version"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_details.go index 7638f5bfccc..00d4bfb3e27 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,16 +15,16 @@ import ( "strings" ) -// CheckResourceTaggingDetails Request to check resource tagging +// CheckResourceTaggingDetails Request to check resource tagging. type CheckResourceTaggingDetails struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Resource OCIDS that need to be verified if tag can be enabled + // Resource OCIDS that need to be verified if a tag can be enabled for them. ResourceIds []string `mandatory:"true" json:"resourceIds"` - // Fleet Name + // Fleet Display Name. FleetDisplayName *string `mandatory:"false" json:"fleetDisplayName"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_request_response.go index 9cc41e99f46..2587a33be43 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/check_resource_tagging_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CheckResourceTagging.go.html to see an example of how to use CheckResourceTaggingRequest. type CheckResourceTaggingRequest struct { - // Details for Checking if FAMS tags can be added for the resources + // Details for checking if Fleet Application Management tags can be added to the resources. CheckResourceTaggingDetails `contributesTo:"body"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_policy.go new file mode 100644 index 00000000000..c8c229cb456 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_policy.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceDetailPolicy Details of the Policy associated +type ComplianceDetailPolicy struct { + + // Compliance Policy Id + CompliancePolicyId *string `mandatory:"true" json:"compliancePolicyId"` + + // Compliane Policy DisplayName + CompliancePolicyDisplayName *string `mandatory:"false" json:"compliancePolicyDisplayName"` + + // Compliane Policy Rule Id + CompliancePolicyRuleId *string `mandatory:"false" json:"compliancePolicyRuleId"` + + // Product Name + CompliancePolicyRuleDisplayName *string `mandatory:"false" json:"compliancePolicyRuleDisplayName"` + + // Grace period in days,weeks,months or years the exemption is applicable for the rule. + GracePeriod *string `mandatory:"false" json:"gracePeriod"` + + PatchSelection PatchSelectionDetails `mandatory:"false" json:"patchSelection"` +} + +func (m ComplianceDetailPolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceDetailPolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ComplianceDetailPolicy) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompliancePolicyDisplayName *string `json:"compliancePolicyDisplayName"` + CompliancePolicyRuleId *string `json:"compliancePolicyRuleId"` + CompliancePolicyRuleDisplayName *string `json:"compliancePolicyRuleDisplayName"` + GracePeriod *string `json:"gracePeriod"` + PatchSelection patchselectiondetails `json:"patchSelection"` + CompliancePolicyId *string `json:"compliancePolicyId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompliancePolicyDisplayName = model.CompliancePolicyDisplayName + + m.CompliancePolicyRuleId = model.CompliancePolicyRuleId + + m.CompliancePolicyRuleDisplayName = model.CompliancePolicyRuleDisplayName + + m.GracePeriod = model.GracePeriod + + nn, e = model.PatchSelection.UnmarshalPolymorphicJSON(model.PatchSelection.JsonData) + if e != nil { + return + } + if nn != nil { + m.PatchSelection = nn.(PatchSelectionDetails) + } else { + m.PatchSelection = nil + } + + m.CompliancePolicyId = model.CompliancePolicyId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_product.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_product.go new file mode 100644 index 00000000000..8697ba7f2db --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_product.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceDetailProduct Details of the Product +type ComplianceDetailProduct struct { + + // Product Name. + ProductName *string `mandatory:"true" json:"productName"` + + // Product Stack. + ProductStack *string `mandatory:"false" json:"productStack"` + + // Product Version. + ProductVersion *string `mandatory:"false" json:"productVersion"` +} + +func (m ComplianceDetailProduct) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceDetailProduct) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_resource.go new file mode 100644 index 00000000000..d9dd3d3ddb5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_resource.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceDetailResource Details of the Resource +type ComplianceDetailResource struct { + + // The OCID to identify the resource. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Name of the resource. + ResourceName *string `mandatory:"true" json:"resourceName"` + + // TenancyId of the resource. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Compartment the resource belongs to. + Compartment *string `mandatory:"false" json:"compartment"` + + // Region the resource belongs to. + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` +} + +func (m ComplianceDetailResource) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceDetailResource) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_target.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_target.go new file mode 100644 index 00000000000..bb448e1dcfc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_detail_target.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceDetailTarget Details of the Target +type ComplianceDetailTarget struct { + + // Target Identifier. + TargetId *string `mandatory:"true" json:"targetId"` + + // Target Name. + TargetName *string `mandatory:"true" json:"targetName"` + + // Current version. + Version *string `mandatory:"false" json:"version"` +} + +func (m ComplianceDetailTarget) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceDetailTarget) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_level.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_level.go new file mode 100644 index 00000000000..ed201631a59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_level.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "strings" +) + +// ComplianceLevelEnum Enum with underlying type: string +type ComplianceLevelEnum string + +// Set of constants representing the allowable values for ComplianceLevelEnum +const ( + ComplianceLevelFleet ComplianceLevelEnum = "FLEET" + ComplianceLevelTarget ComplianceLevelEnum = "TARGET" +) + +var mappingComplianceLevelEnum = map[string]ComplianceLevelEnum{ + "FLEET": ComplianceLevelFleet, + "TARGET": ComplianceLevelTarget, +} + +var mappingComplianceLevelEnumLowerCase = map[string]ComplianceLevelEnum{ + "fleet": ComplianceLevelFleet, + "target": ComplianceLevelTarget, +} + +// GetComplianceLevelEnumValues Enumerates the set of values for ComplianceLevelEnum +func GetComplianceLevelEnumValues() []ComplianceLevelEnum { + values := make([]ComplianceLevelEnum, 0) + for _, v := range mappingComplianceLevelEnum { + values = append(values, v) + } + return values +} + +// GetComplianceLevelEnumStringValues Enumerates the set of values in String for ComplianceLevelEnum +func GetComplianceLevelEnumStringValues() []string { + return []string{ + "FLEET", + "TARGET", + } +} + +// GetMappingComplianceLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComplianceLevelEnum(val string) (ComplianceLevelEnum, bool) { + enum, ok := mappingComplianceLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_patch_detail.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_patch_detail.go new file mode 100644 index 00000000000..3d3e60538fd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_patch_detail.go @@ -0,0 +1,59 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompliancePatchDetail Details of the Patch +type CompliancePatchDetail struct { + + // patch Name. + PatchName *string `mandatory:"true" json:"patchName"` + + // Type of patch. + PatchType *string `mandatory:"true" json:"patchType"` + + // patch OCID. + PatchId *string `mandatory:"false" json:"patchId"` + + // Patch Description. + PatchDescription *string `mandatory:"false" json:"patchDescription"` + + // Date on which patch was released + TimeReleased *common.SDKTime `mandatory:"false" json:"timeReleased"` + + // Patch Severity. + Severity PatchSeverityEnum `mandatory:"false" json:"severity,omitempty"` + + Product *ComplianceDetailProduct `mandatory:"false" json:"product"` +} + +func (m CompliancePatchDetail) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompliancePatchDetail) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPatchSeverityEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetPatchSeverityEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy.go new file mode 100644 index 00000000000..91fd20970ce --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy.go @@ -0,0 +1,137 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompliancePolicy Define software patch compliance policies for various products running in OCI resources. +// A compliance policy is a configuration you set up for various products to report compliance by defining the schedule and patch baseline +type CompliancePolicy struct { + + // The OCID of the CompliancePolicy. + Id *string `mandatory:"true" json:"id"` + + // Display name for the CompliancePolicy. + DisplayName *string `mandatory:"true" json:"displayName"` + + // platformConfiguration OCID corresponding to the Product. + ProductId *string `mandatory:"true" json:"productId"` + + // The OCID of the compartment the CompliancePolicy belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the CompliancePolicy was created, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the CompliancePolicy. + LifecycleState CompliancePolicyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // The date and time the CompliancePolicy was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message that describes the current state of the CompliancePolicy in more detail. For example, + // can be used to provide actionable information for a resource in the Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m CompliancePolicy) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompliancePolicy) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCompliancePolicyLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCompliancePolicyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CompliancePolicyLifecycleStateEnum Enum with underlying type: string +type CompliancePolicyLifecycleStateEnum string + +// Set of constants representing the allowable values for CompliancePolicyLifecycleStateEnum +const ( + CompliancePolicyLifecycleStateCreating CompliancePolicyLifecycleStateEnum = "CREATING" + CompliancePolicyLifecycleStateUpdating CompliancePolicyLifecycleStateEnum = "UPDATING" + CompliancePolicyLifecycleStateActive CompliancePolicyLifecycleStateEnum = "ACTIVE" + CompliancePolicyLifecycleStateDeleting CompliancePolicyLifecycleStateEnum = "DELETING" + CompliancePolicyLifecycleStateDeleted CompliancePolicyLifecycleStateEnum = "DELETED" + CompliancePolicyLifecycleStateFailed CompliancePolicyLifecycleStateEnum = "FAILED" +) + +var mappingCompliancePolicyLifecycleStateEnum = map[string]CompliancePolicyLifecycleStateEnum{ + "CREATING": CompliancePolicyLifecycleStateCreating, + "UPDATING": CompliancePolicyLifecycleStateUpdating, + "ACTIVE": CompliancePolicyLifecycleStateActive, + "DELETING": CompliancePolicyLifecycleStateDeleting, + "DELETED": CompliancePolicyLifecycleStateDeleted, + "FAILED": CompliancePolicyLifecycleStateFailed, +} + +var mappingCompliancePolicyLifecycleStateEnumLowerCase = map[string]CompliancePolicyLifecycleStateEnum{ + "creating": CompliancePolicyLifecycleStateCreating, + "updating": CompliancePolicyLifecycleStateUpdating, + "active": CompliancePolicyLifecycleStateActive, + "deleting": CompliancePolicyLifecycleStateDeleting, + "deleted": CompliancePolicyLifecycleStateDeleted, + "failed": CompliancePolicyLifecycleStateFailed, +} + +// GetCompliancePolicyLifecycleStateEnumValues Enumerates the set of values for CompliancePolicyLifecycleStateEnum +func GetCompliancePolicyLifecycleStateEnumValues() []CompliancePolicyLifecycleStateEnum { + values := make([]CompliancePolicyLifecycleStateEnum, 0) + for _, v := range mappingCompliancePolicyLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetCompliancePolicyLifecycleStateEnumStringValues Enumerates the set of values in String for CompliancePolicyLifecycleStateEnum +func GetCompliancePolicyLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingCompliancePolicyLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCompliancePolicyLifecycleStateEnum(val string) (CompliancePolicyLifecycleStateEnum, bool) { + enum, ok := mappingCompliancePolicyLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_collection.go new file mode 100644 index 00000000000..4db1af267bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompliancePolicyCollection Results of a compliancePolicy search. Contains both CompliancePolicySummary items and other information, such as metadata. +type CompliancePolicyCollection struct { + + // List of compliancePolicys. + Items []CompliancePolicySummary `mandatory:"true" json:"items"` +} + +func (m CompliancePolicyCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompliancePolicyCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule.go new file mode 100644 index 00000000000..6fb47501588 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule.go @@ -0,0 +1,229 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompliancePolicyRule Set of rules that are used to calculate the compliance status of the product. +// Specific rules will take precedence over broader rules. +type CompliancePolicyRule struct { + + // Unique OCID of the CompliancePolicyRule. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Unique OCID of the CompliancePolicy. + CompliancePolicyId *string `mandatory:"true" json:"compliancePolicyId"` + + ProductVersion *ProductVersionDetails `mandatory:"true" json:"productVersion"` + + // PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + PatchType []string `mandatory:"true" json:"patchType"` + + PatchSelection PatchSelectionDetails `mandatory:"true" json:"patchSelection"` + + // The OCID of the compartment the CompliancePolicyRule belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the CompliancePolicyRule was created, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the CompliancePolicyRule. + LifecycleState CompliancePolicyRuleLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // Severity to which this CompliancePolicyRule applies. + Severity []ComplianceRuleSeverityEnum `mandatory:"false" json:"severity,omitempty"` + + // Grace period in days,weeks,months or years the exemption is applicable for the rule. + // This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + GracePeriod *string `mandatory:"false" json:"gracePeriod"` + + // The date and time the CompliancePolicyRule was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message that describes the current state of the CompliancePolicyRule in more detail. For example, + // can be used to provide actionable information for a resource in the Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m CompliancePolicyRule) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompliancePolicyRule) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCompliancePolicyRuleLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCompliancePolicyRuleLifecycleStateEnumStringValues(), ","))) + } + + for _, val := range m.Severity { + if _, ok := GetMappingComplianceRuleSeverityEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", val, strings.Join(GetComplianceRuleSeverityEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CompliancePolicyRule) UnmarshalJSON(data []byte) (e error) { + model := struct { + Severity []ComplianceRuleSeverityEnum `json:"severity"` + GracePeriod *string `json:"gracePeriod"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + CompliancePolicyId *string `json:"compliancePolicyId"` + ProductVersion *ProductVersionDetails `json:"productVersion"` + PatchType []string `json:"patchType"` + PatchSelection patchselectiondetails `json:"patchSelection"` + CompartmentId *string `json:"compartmentId"` + TimeCreated *common.SDKTime `json:"timeCreated"` + LifecycleState CompliancePolicyRuleLifecycleStateEnum `json:"lifecycleState"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Severity = make([]ComplianceRuleSeverityEnum, len(model.Severity)) + copy(m.Severity, model.Severity) + m.GracePeriod = model.GracePeriod + + m.TimeUpdated = model.TimeUpdated + + m.LifecycleDetails = model.LifecycleDetails + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.DisplayName = model.DisplayName + + m.CompliancePolicyId = model.CompliancePolicyId + + m.ProductVersion = model.ProductVersion + + m.PatchType = make([]string, len(model.PatchType)) + copy(m.PatchType, model.PatchType) + nn, e = model.PatchSelection.UnmarshalPolymorphicJSON(model.PatchSelection.JsonData) + if e != nil { + return + } + if nn != nil { + m.PatchSelection = nn.(PatchSelectionDetails) + } else { + m.PatchSelection = nil + } + + m.CompartmentId = model.CompartmentId + + m.TimeCreated = model.TimeCreated + + m.LifecycleState = model.LifecycleState + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + return +} + +// CompliancePolicyRuleLifecycleStateEnum Enum with underlying type: string +type CompliancePolicyRuleLifecycleStateEnum string + +// Set of constants representing the allowable values for CompliancePolicyRuleLifecycleStateEnum +const ( + CompliancePolicyRuleLifecycleStateCreating CompliancePolicyRuleLifecycleStateEnum = "CREATING" + CompliancePolicyRuleLifecycleStateUpdating CompliancePolicyRuleLifecycleStateEnum = "UPDATING" + CompliancePolicyRuleLifecycleStateActive CompliancePolicyRuleLifecycleStateEnum = "ACTIVE" + CompliancePolicyRuleLifecycleStateDeleting CompliancePolicyRuleLifecycleStateEnum = "DELETING" + CompliancePolicyRuleLifecycleStateDeleted CompliancePolicyRuleLifecycleStateEnum = "DELETED" + CompliancePolicyRuleLifecycleStateFailed CompliancePolicyRuleLifecycleStateEnum = "FAILED" +) + +var mappingCompliancePolicyRuleLifecycleStateEnum = map[string]CompliancePolicyRuleLifecycleStateEnum{ + "CREATING": CompliancePolicyRuleLifecycleStateCreating, + "UPDATING": CompliancePolicyRuleLifecycleStateUpdating, + "ACTIVE": CompliancePolicyRuleLifecycleStateActive, + "DELETING": CompliancePolicyRuleLifecycleStateDeleting, + "DELETED": CompliancePolicyRuleLifecycleStateDeleted, + "FAILED": CompliancePolicyRuleLifecycleStateFailed, +} + +var mappingCompliancePolicyRuleLifecycleStateEnumLowerCase = map[string]CompliancePolicyRuleLifecycleStateEnum{ + "creating": CompliancePolicyRuleLifecycleStateCreating, + "updating": CompliancePolicyRuleLifecycleStateUpdating, + "active": CompliancePolicyRuleLifecycleStateActive, + "deleting": CompliancePolicyRuleLifecycleStateDeleting, + "deleted": CompliancePolicyRuleLifecycleStateDeleted, + "failed": CompliancePolicyRuleLifecycleStateFailed, +} + +// GetCompliancePolicyRuleLifecycleStateEnumValues Enumerates the set of values for CompliancePolicyRuleLifecycleStateEnum +func GetCompliancePolicyRuleLifecycleStateEnumValues() []CompliancePolicyRuleLifecycleStateEnum { + values := make([]CompliancePolicyRuleLifecycleStateEnum, 0) + for _, v := range mappingCompliancePolicyRuleLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetCompliancePolicyRuleLifecycleStateEnumStringValues Enumerates the set of values in String for CompliancePolicyRuleLifecycleStateEnum +func GetCompliancePolicyRuleLifecycleStateEnumStringValues() []string { + return []string{ + "CREATING", + "UPDATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + +// GetMappingCompliancePolicyRuleLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingCompliancePolicyRuleLifecycleStateEnum(val string) (CompliancePolicyRuleLifecycleStateEnum, bool) { + enum, ok := mappingCompliancePolicyRuleLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_collection.go new file mode 100644 index 00000000000..7f44b00f252 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompliancePolicyRuleCollection Results of a compliancePolicyRule search. Contains both CompliancePolicyRuleSummary items and other information, such as metadata. +type CompliancePolicyRuleCollection struct { + + // List of complianePolicyRules. + Items []CompliancePolicyRuleSummary `mandatory:"true" json:"items"` +} + +func (m CompliancePolicyRuleCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompliancePolicyRuleCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_summary.go new file mode 100644 index 00000000000..b4646926d96 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_rule_summary.go @@ -0,0 +1,170 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompliancePolicyRuleSummary Summary information about a CompliancePolicyRule. +type CompliancePolicyRuleSummary struct { + + // Unique OCID of the CompliancePolicyRule. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // Unique OCID of the CompliancePolicy. + CompliancePolicyId *string `mandatory:"true" json:"compliancePolicyId"` + + ProductVersion *ProductVersionDetails `mandatory:"true" json:"productVersion"` + + // PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + PatchType []string `mandatory:"true" json:"patchType"` + + PatchSelection PatchSelectionDetails `mandatory:"true" json:"patchSelection"` + + // The OCID of the compartment the CompliancePolicyRule belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the CompliancePolicyRule was created, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the CompliancePolicyRule. + LifecycleState CompliancePolicyRuleLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Severity to which this CompliancePolicyRule applies. + Severity []ComplianceRuleSeverityEnum `mandatory:"false" json:"severity,omitempty"` + + // Grace period in days,weeks,months or years the exemption is applicable for the rule. + // This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + GracePeriod *string `mandatory:"false" json:"gracePeriod"` + + // The date and time the CompliancePolicyRule was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message that describes the current state of the CompliancePolicyRule in more detail. For example, + // can be used to provide actionable information for a resource in the Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m CompliancePolicyRuleSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompliancePolicyRuleSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCompliancePolicyRuleLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCompliancePolicyRuleLifecycleStateEnumStringValues(), ","))) + } + + for _, val := range m.Severity { + if _, ok := GetMappingComplianceRuleSeverityEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", val, strings.Join(GetComplianceRuleSeverityEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CompliancePolicyRuleSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + Severity []ComplianceRuleSeverityEnum `json:"severity"` + GracePeriod *string `json:"gracePeriod"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + LifecycleDetails *string `json:"lifecycleDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + DisplayName *string `json:"displayName"` + CompliancePolicyId *string `json:"compliancePolicyId"` + ProductVersion *ProductVersionDetails `json:"productVersion"` + PatchType []string `json:"patchType"` + PatchSelection patchselectiondetails `json:"patchSelection"` + CompartmentId *string `json:"compartmentId"` + TimeCreated *common.SDKTime `json:"timeCreated"` + LifecycleState CompliancePolicyRuleLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Severity = make([]ComplianceRuleSeverityEnum, len(model.Severity)) + copy(m.Severity, model.Severity) + m.GracePeriod = model.GracePeriod + + m.TimeUpdated = model.TimeUpdated + + m.LifecycleDetails = model.LifecycleDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.DisplayName = model.DisplayName + + m.CompliancePolicyId = model.CompliancePolicyId + + m.ProductVersion = model.ProductVersion + + m.PatchType = make([]string, len(model.PatchType)) + copy(m.PatchType, model.PatchType) + nn, e = model.PatchSelection.UnmarshalPolymorphicJSON(model.PatchSelection.JsonData) + if e != nil { + return + } + if nn != nil { + m.PatchSelection = nn.(PatchSelectionDetails) + } else { + m.PatchSelection = nil + } + + m.CompartmentId = model.CompartmentId + + m.TimeCreated = model.TimeCreated + + m.LifecycleState = model.LifecycleState + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_summary.go new file mode 100644 index 00000000000..f0f2857a826 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_policy_summary.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CompliancePolicySummary Summary information about a CompliancePolicy. +type CompliancePolicySummary struct { + + // The OCID of the CompliancePolicy. + Id *string `mandatory:"true" json:"id"` + + // Display name for the CompliancePolicy. + DisplayName *string `mandatory:"true" json:"displayName"` + + // platformConfiguration OCID corresponding to the Product. + ProductId *string `mandatory:"true" json:"productId"` + + // The OCID of the compartment the CompliancePolicy belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The date and time the CompliancePolicy was created, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The current state of the CompliancePolicy. + LifecycleState CompliancePolicyLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"true" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` + + // The date and time the CompliancePolicy was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // A message that describes the current state of the CompliancePolicy in more detail. For example, + // can be used to provide actionable information for a resource in the Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m CompliancePolicySummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CompliancePolicySummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCompliancePolicyLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetCompliancePolicyLifecycleStateEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record.go new file mode 100644 index 00000000000..d64242d6029 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record.go @@ -0,0 +1,122 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceRecord The compliance status reports. +type ComplianceRecord struct { + + // The OCID of the ComplianceRecord. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the entity for which the compliance is calculated.Ex.FleetId + EntityId *string `mandatory:"true" json:"entityId"` + + // The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + EntityDisplayName *string `mandatory:"true" json:"entityDisplayName"` + + Resource *ComplianceDetailResource `mandatory:"true" json:"resource"` + + Target *ComplianceDetailTarget `mandatory:"true" json:"target"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + Policy *ComplianceDetailPolicy `mandatory:"false" json:"policy"` + + Patch *CompliancePatchDetail `mandatory:"false" json:"patch"` + + // Last known compliance state of target. + ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + + // The date and time the ComplianceRecord was created, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The date and time the ComplianceRecord was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The current state of the ComplianceRecord. + LifecycleState ComplianceRecordLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m ComplianceRecord) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceRecord) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if _, ok := GetMappingComplianceRecordLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComplianceRecordLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ComplianceRecordLifecycleStateEnum Enum with underlying type: string +type ComplianceRecordLifecycleStateEnum string + +// Set of constants representing the allowable values for ComplianceRecordLifecycleStateEnum +const ( + ComplianceRecordLifecycleStateActive ComplianceRecordLifecycleStateEnum = "ACTIVE" + ComplianceRecordLifecycleStateDeleted ComplianceRecordLifecycleStateEnum = "DELETED" + ComplianceRecordLifecycleStateFailed ComplianceRecordLifecycleStateEnum = "FAILED" +) + +var mappingComplianceRecordLifecycleStateEnum = map[string]ComplianceRecordLifecycleStateEnum{ + "ACTIVE": ComplianceRecordLifecycleStateActive, + "DELETED": ComplianceRecordLifecycleStateDeleted, + "FAILED": ComplianceRecordLifecycleStateFailed, +} + +var mappingComplianceRecordLifecycleStateEnumLowerCase = map[string]ComplianceRecordLifecycleStateEnum{ + "active": ComplianceRecordLifecycleStateActive, + "deleted": ComplianceRecordLifecycleStateDeleted, + "failed": ComplianceRecordLifecycleStateFailed, +} + +// GetComplianceRecordLifecycleStateEnumValues Enumerates the set of values for ComplianceRecordLifecycleStateEnum +func GetComplianceRecordLifecycleStateEnumValues() []ComplianceRecordLifecycleStateEnum { + values := make([]ComplianceRecordLifecycleStateEnum, 0) + for _, v := range mappingComplianceRecordLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetComplianceRecordLifecycleStateEnumStringValues Enumerates the set of values in String for ComplianceRecordLifecycleStateEnum +func GetComplianceRecordLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + } +} + +// GetMappingComplianceRecordLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComplianceRecordLifecycleStateEnum(val string) (ComplianceRecordLifecycleStateEnum, bool) { + enum, ok := mappingComplianceRecordLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation.go new file mode 100644 index 00000000000..aa5768137d6 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceRecordAggregation Aggregated summary information for ComplianceRecord +type ComplianceRecordAggregation struct { + + // count of ComplianceRecord in a Tenancy. + Count *int `mandatory:"true" json:"count"` + + Dimensions *ComplianceRecordDimension `mandatory:"true" json:"dimensions"` +} + +func (m ComplianceRecordAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceRecordAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation_collection.go new file mode 100644 index 00000000000..a43c1fc24c7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_aggregation_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceRecordAggregationCollection An array of ComplianceRecord objects +type ComplianceRecordAggregationCollection struct { + + // List of ComplianceRecordAggregation objects. + Items []ComplianceRecordAggregation `mandatory:"true" json:"items"` +} + +func (m ComplianceRecordAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceRecordAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_collection.go new file mode 100644 index 00000000000..60999a9006c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceRecordCollection Results of a compliancePolicy search. Contains both CompliancePolicySummary items and other information, such as metadata. +type ComplianceRecordCollection struct { + + // List of compliancePolicys. + Items []ComplianceRecordSummary `mandatory:"true" json:"items"` +} + +func (m ComplianceRecordCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceRecordCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_dimension.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_dimension.go new file mode 100644 index 00000000000..64a583cdd3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_dimension.go @@ -0,0 +1,48 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceRecordDimension Aggregated summary information for ComplianceRecord +type ComplianceRecordDimension struct { + + // Last known compliance state. + ComplianceState ComplianceStateEnum `mandatory:"true" json:"complianceState"` + + // Level at which the compliance is calculated. + ComplianceLevel ComplianceLevelEnum `mandatory:"true" json:"complianceLevel"` +} + +func (m ComplianceRecordDimension) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceRecordDimension) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if _, ok := GetMappingComplianceLevelEnum(string(m.ComplianceLevel)); !ok && m.ComplianceLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceLevel: %s. Supported values are: %s.", m.ComplianceLevel, strings.Join(GetComplianceLevelEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_summary.go new file mode 100644 index 00000000000..d1456a42272 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_record_summary.go @@ -0,0 +1,76 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ComplianceRecordSummary Summary information about a ComplianceDetail. +type ComplianceRecordSummary struct { + + // The OCID of the ComplianceRecord. + Id *string `mandatory:"true" json:"id"` + + // The OCID of the entity for which the compliance is calculated.Ex.FleetId + EntityId *string `mandatory:"true" json:"entityId"` + + // The displayName of the entity for which the compliance is calculated.Ex.DisplayName for the Fleet + EntityDisplayName *string `mandatory:"true" json:"entityDisplayName"` + + Resource *ComplianceDetailResource `mandatory:"true" json:"resource"` + + Target *ComplianceDetailTarget `mandatory:"true" json:"target"` + + // The OCID of the compartment. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + Policy *ComplianceDetailPolicy `mandatory:"false" json:"policy"` + + Patch *CompliancePatchDetail `mandatory:"false" json:"patch"` + + // Last known compliance state of target. + ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + + // The date and time the ComplianceRecord was created, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` + + // The date and time the ComplianceRecord was updated, in the format defined by RFC 3339 (https://tools.ietf.org/html/rfc3339). + // Example: `2016-08-25T21:10:29.600Z` + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The current state of the ComplianceRecord. + LifecycleState ComplianceRecordLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` +} + +func (m ComplianceRecordSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ComplianceRecordSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if _, ok := GetMappingComplianceRecordLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetComplianceRecordLifecycleStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report.go index c56189ff0de..cbbbac061b0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// ComplianceReport Summary of a compliance report. +// ComplianceReport Compliance details for a fleet in Fleet Application Management. type ComplianceReport struct { // Compliance Report Identifier @@ -25,10 +24,10 @@ type ComplianceReport struct { // The fleet OCID. FleetId *string `mandatory:"true" json:"fleetId"` - // Last known compliance state of fleet. + // The last known compliance state of the fleet. ComplianceState ComplianceStateEnum `mandatory:"true" json:"complianceState"` - // Resources assocaited with the Fleet. + // Resources associated with the Fleet. Resources []ComplianceReportResource `mandatory:"false" json:"resources"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_patch_detail.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_patch_detail.go index b97f7821fa9..968a1b3d5c3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_patch_detail.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_patch_detail.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,22 +15,22 @@ import ( "strings" ) -// ComplianceReportPatchDetail Details of the Patch +// ComplianceReportPatchDetail Details of the Patch. type ComplianceReportPatchDetail struct { - // The OCID to identify this analysis results. + // Patch name. PatchName *string `mandatory:"true" json:"patchName"` // Type of patch. PatchType *string `mandatory:"true" json:"patchType"` - // The OCID of the work request to start the analysis. + // Patch description. PatchDescription *string `mandatory:"false" json:"patchDescription"` - // Time the patch was applied + // Time the patch was applied. TimeApplied *common.SDKTime `mandatory:"false" json:"timeApplied"` - // Date on which patch was released. + // The date on which patch was released. TimeReleased *common.SDKTime `mandatory:"false" json:"timeReleased"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_product.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_product.go index 09110bdff61..ae074f8dcd9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_product.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_product.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// ComplianceReportProduct Details of the Product +// ComplianceReportProduct Details of the Product. type ComplianceReportProduct struct { - // Product Name + // Product Name. ProductName *string `mandatory:"true" json:"productName"` // Managed Targets associated with the Product. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_resource.go index 0acb4feff25..1b7b05fd9dc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_resource.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -28,7 +27,7 @@ type ComplianceReportResource struct { // Type of the resource. ResourceType *string `mandatory:"true" json:"resourceType"` - // Last known compliance state of fleet. + // The last known compliance state of the fleet. ComplianceState ComplianceStateEnum `mandatory:"true" json:"complianceState"` // TenancyId of the resource. @@ -40,10 +39,11 @@ type ComplianceReportResource struct { // Compartment the resource belongs to. Compartment *string `mandatory:"false" json:"compartment"` - // Region the resource belongs to. + // The region the resource belongs to. ResourceRegion *string `mandatory:"false" json:"resourceRegion"` - // Products assocaited with the Fleet.Only products belonging to managed targets will be shown. + // Products associated with the Fleet. + // Only the products belonging to managed targets will be shown. Products []ComplianceReportProduct `mandatory:"false" json:"products"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_target.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_target.go index 750f79a0bb1..35a52049c9f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_target.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_report_target.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,19 +15,19 @@ import ( "strings" ) -// ComplianceReportTarget Details of the Patch. +// ComplianceReportTarget Details of the target and patches. type ComplianceReportTarget struct { - // Target Identifier. + // Target Identifier.Can be the target name if a separate ID is not available. TargetId *string `mandatory:"true" json:"targetId"` // Target Name. TargetName *string `mandatory:"true" json:"targetName"` - // Last known compliance state of target. + // The last known compliance state of the target. ComplianceState ComplianceStateEnum `mandatory:"true" json:"complianceState"` - // Current version. + // Current version of the target. Version *string `mandatory:"false" json:"version"` // Installed Patches for the Target. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_rule_severity.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_rule_severity.go new file mode 100644 index 00000000000..078817ac445 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_rule_severity.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "strings" +) + +// ComplianceRuleSeverityEnum Enum with underlying type: string +type ComplianceRuleSeverityEnum string + +// Set of constants representing the allowable values for ComplianceRuleSeverityEnum +const ( + ComplianceRuleSeverityCritical ComplianceRuleSeverityEnum = "CRITICAL" + ComplianceRuleSeverityHigh ComplianceRuleSeverityEnum = "HIGH" + ComplianceRuleSeverityMedium ComplianceRuleSeverityEnum = "MEDIUM" + ComplianceRuleSeverityLow ComplianceRuleSeverityEnum = "LOW" +) + +var mappingComplianceRuleSeverityEnum = map[string]ComplianceRuleSeverityEnum{ + "CRITICAL": ComplianceRuleSeverityCritical, + "HIGH": ComplianceRuleSeverityHigh, + "MEDIUM": ComplianceRuleSeverityMedium, + "LOW": ComplianceRuleSeverityLow, +} + +var mappingComplianceRuleSeverityEnumLowerCase = map[string]ComplianceRuleSeverityEnum{ + "critical": ComplianceRuleSeverityCritical, + "high": ComplianceRuleSeverityHigh, + "medium": ComplianceRuleSeverityMedium, + "low": ComplianceRuleSeverityLow, +} + +// GetComplianceRuleSeverityEnumValues Enumerates the set of values for ComplianceRuleSeverityEnum +func GetComplianceRuleSeverityEnumValues() []ComplianceRuleSeverityEnum { + values := make([]ComplianceRuleSeverityEnum, 0) + for _, v := range mappingComplianceRuleSeverityEnum { + values = append(values, v) + } + return values +} + +// GetComplianceRuleSeverityEnumStringValues Enumerates the set of values in String for ComplianceRuleSeverityEnum +func GetComplianceRuleSeverityEnumStringValues() []string { + return []string{ + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW", + } +} + +// GetMappingComplianceRuleSeverityEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingComplianceRuleSeverityEnum(val string) (ComplianceRuleSeverityEnum, bool) { + enum, ok := mappingComplianceRuleSeverityEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_state.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_state.go index 4a3bb43bc17..8e4b18de388 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_state.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/compliance_state.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/component_properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/component_properties.go index acc443e930a..4d35f50e20a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/component_properties.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/component_properties.go @@ -4,29 +4,36 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement import ( + "encoding/json" "fmt" "github.com/oracle/oci-go-sdk/v65/common" "strings" ) -// ComponentProperties The properties of the task. +// ComponentProperties The properties of the component. type ComponentProperties struct { - // The action to be taken in case of task failure. + // The action to be taken in case of a failure. ActionOnFailure ComponentPropertiesActionOnFailureEnum `mandatory:"true" json:"actionOnFailure"` - // The hosts to execute on. + // The runOn condition for the task/group/container. + // Build task execution conditions if applicable to product and product-specific components. + // This condition is relevant when handling product stack workflows. + // Example: target.product.name = Oracle WebLogic Server OR target.product.name = Oracle HTTP Server RunOn *string `mandatory:"false" json:"runOn"` - // The condition in which the task is to be executed. + // Build control flow conditions that determine the relevance of the task execution. Condition *string `mandatory:"false" json:"condition"` + + PauseDetails PauseDetails `mandatory:"false" json:"pauseDetails"` + + NotificationPreferences *TaskNotificationPreferences `mandatory:"false" json:"notificationPreferences"` } func (m ComponentProperties) String() string { @@ -48,6 +55,42 @@ func (m ComponentProperties) ValidateEnumValue() (bool, error) { return false, nil } +// UnmarshalJSON unmarshals from json +func (m *ComponentProperties) UnmarshalJSON(data []byte) (e error) { + model := struct { + RunOn *string `json:"runOn"` + Condition *string `json:"condition"` + PauseDetails pausedetails `json:"pauseDetails"` + NotificationPreferences *TaskNotificationPreferences `json:"notificationPreferences"` + ActionOnFailure ComponentPropertiesActionOnFailureEnum `json:"actionOnFailure"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.RunOn = model.RunOn + + m.Condition = model.Condition + + nn, e = model.PauseDetails.UnmarshalPolymorphicJSON(model.PauseDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.PauseDetails = nn.(PauseDetails) + } else { + m.PauseDetails = nil + } + + m.NotificationPreferences = model.NotificationPreferences + + m.ActionOnFailure = model.ActionOnFailure + + return +} + // ComponentPropertiesActionOnFailureEnum Enum with underlying type: string type ComponentPropertiesActionOnFailureEnum string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/condition.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/condition.go index 4f3bb1a9d6d..3813b0219b4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/condition.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/condition.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -19,13 +18,16 @@ import ( // Condition Rule condition type Condition struct { - // Attribute Group. + // Attribute Group. Provide a Tag namespace if the rule is based on a tag. + // Provide resource type if the rule is based on a resource property. AttrGroup *string `mandatory:"true" json:"attrGroup"` - // Attribute Key. + // Attribute Key.Provide Tag key if the rule is based on a tag. + // Provide resource property name if the rule is based on a resource property. AttrKey *string `mandatory:"true" json:"attrKey"` - // Attribute Value. + // Attribute Value.Provide Tag value if the rule is based on a tag. + // Provide resource property value if the rule is based on a resource property. AttrValue *string `mandatory:"true" json:"attrValue"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_association_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_association_details.go new file mode 100644 index 00000000000..ba034a0467e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_association_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigAssociationDetails Associated Configuration details. +type ConfigAssociationDetails struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` +} + +func (m ConfigAssociationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ConfigAssociationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_category_details.go new file mode 100644 index 00000000000..b1580d276ed --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/config_category_details.go @@ -0,0 +1,147 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ConfigCategoryDetails Config Category Details. +type ConfigCategoryDetails interface { +} + +type configcategorydetails struct { + JsonData []byte + ConfigCategory string `json:"configCategory"` +} + +// UnmarshalJSON unmarshals json +func (m *configcategorydetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerconfigcategorydetails configcategorydetails + s := struct { + Model Unmarshalerconfigcategorydetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.ConfigCategory = s.Model.ConfigCategory + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *configcategorydetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.ConfigCategory { + case "PRODUCT_STACK": + mm := ProductStackConfigCategoryDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ENVIRONMENT": + mm := EnvironmentConfigCategoryDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "CREDENTIAL": + mm := CredentialConfigCategoryDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PATCH_TYPE": + mm := PatchTypeConfigCategoryDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PRODUCT": + mm := ProductConfigCategoryDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ConfigCategoryDetails: %s.", m.ConfigCategory) + return *m, nil + } +} + +func (m configcategorydetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m configcategorydetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ConfigCategoryDetailsConfigCategoryEnum Enum with underlying type: string +type ConfigCategoryDetailsConfigCategoryEnum string + +// Set of constants representing the allowable values for ConfigCategoryDetailsConfigCategoryEnum +const ( + ConfigCategoryDetailsConfigCategoryProduct ConfigCategoryDetailsConfigCategoryEnum = "PRODUCT" + ConfigCategoryDetailsConfigCategoryProductStack ConfigCategoryDetailsConfigCategoryEnum = "PRODUCT_STACK" + ConfigCategoryDetailsConfigCategoryEnvironment ConfigCategoryDetailsConfigCategoryEnum = "ENVIRONMENT" + ConfigCategoryDetailsConfigCategoryPatchType ConfigCategoryDetailsConfigCategoryEnum = "PATCH_TYPE" + ConfigCategoryDetailsConfigCategoryCredential ConfigCategoryDetailsConfigCategoryEnum = "CREDENTIAL" +) + +var mappingConfigCategoryDetailsConfigCategoryEnum = map[string]ConfigCategoryDetailsConfigCategoryEnum{ + "PRODUCT": ConfigCategoryDetailsConfigCategoryProduct, + "PRODUCT_STACK": ConfigCategoryDetailsConfigCategoryProductStack, + "ENVIRONMENT": ConfigCategoryDetailsConfigCategoryEnvironment, + "PATCH_TYPE": ConfigCategoryDetailsConfigCategoryPatchType, + "CREDENTIAL": ConfigCategoryDetailsConfigCategoryCredential, +} + +var mappingConfigCategoryDetailsConfigCategoryEnumLowerCase = map[string]ConfigCategoryDetailsConfigCategoryEnum{ + "product": ConfigCategoryDetailsConfigCategoryProduct, + "product_stack": ConfigCategoryDetailsConfigCategoryProductStack, + "environment": ConfigCategoryDetailsConfigCategoryEnvironment, + "patch_type": ConfigCategoryDetailsConfigCategoryPatchType, + "credential": ConfigCategoryDetailsConfigCategoryCredential, +} + +// GetConfigCategoryDetailsConfigCategoryEnumValues Enumerates the set of values for ConfigCategoryDetailsConfigCategoryEnum +func GetConfigCategoryDetailsConfigCategoryEnumValues() []ConfigCategoryDetailsConfigCategoryEnum { + values := make([]ConfigCategoryDetailsConfigCategoryEnum, 0) + for _, v := range mappingConfigCategoryDetailsConfigCategoryEnum { + values = append(values, v) + } + return values +} + +// GetConfigCategoryDetailsConfigCategoryEnumStringValues Enumerates the set of values in String for ConfigCategoryDetailsConfigCategoryEnum +func GetConfigCategoryDetailsConfigCategoryEnumStringValues() []string { + return []string{ + "PRODUCT", + "PRODUCT_STACK", + "ENVIRONMENT", + "PATCH_TYPE", + "CREDENTIAL", + } +} + +// GetMappingConfigCategoryDetailsConfigCategoryEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingConfigCategoryDetailsConfigCategoryEnum(val string) (ConfigCategoryDetailsConfigCategoryEnum, bool) { + enum, ok := mappingConfigCategoryDetailsConfigCategoryEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_details.go index 3dc7cda7da5..6a96d114531 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// ConfirmTargetsDetails Details of the targets that needs to be confirmed for FAMS management +// ConfirmTargetsDetails Details of the targets to be confirmed for Fleet Application Management. type ConfirmTargetsDetails struct { // The targets to confirm. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_request_response.go index 5c1ffad2110..9bee60eaf81 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/confirm_targets_request_response.go @@ -21,7 +21,7 @@ type ConfirmTargetsRequest struct { // Details for confirming Targets. ConfirmTargetsDetails `contributesTo:"body"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/content_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/content_details.go index a569a523d0e..6acc4f8c5c5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/content_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/content_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,7 @@ import ( "strings" ) -// ContentDetails Content Source Details. +// ContentDetails Content Source details. type ContentDetails interface { } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_details.go new file mode 100644 index 00000000000..808928bbf3b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_details.go @@ -0,0 +1,127 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateCompliancePolicyRuleDetails The data to create a CompliancePolicyRule. +type CreateCompliancePolicyRuleDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + ProductVersion *ProductVersionDetails `mandatory:"true" json:"productVersion"` + + // PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + PatchType []string `mandatory:"true" json:"patchType"` + + PatchSelection PatchSelectionDetails `mandatory:"true" json:"patchSelection"` + + // The OCID of the compartment the CompliancePolicyRule belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // Unique OCID of the CompliancePolicy this CompliancePolicyRule belongs to. + CompliancePolicyId *string `mandatory:"false" json:"compliancePolicyId"` + + // Severity to which this CompliancePolicyRule applies. + Severity []ComplianceRuleSeverityEnum `mandatory:"false" json:"severity,omitempty"` + + // Grace period in days,weeks,months or years the exemption is applicable for the rule. + // This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + GracePeriod *string `mandatory:"false" json:"gracePeriod"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateCompliancePolicyRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateCompliancePolicyRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.Severity { + if _, ok := GetMappingComplianceRuleSeverityEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", val, strings.Join(GetComplianceRuleSeverityEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreateCompliancePolicyRuleDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + CompliancePolicyId *string `json:"compliancePolicyId"` + Severity []ComplianceRuleSeverityEnum `json:"severity"` + GracePeriod *string `json:"gracePeriod"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + DisplayName *string `json:"displayName"` + ProductVersion *ProductVersionDetails `json:"productVersion"` + PatchType []string `json:"patchType"` + PatchSelection patchselectiondetails `json:"patchSelection"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.CompliancePolicyId = model.CompliancePolicyId + + m.Severity = make([]ComplianceRuleSeverityEnum, len(model.Severity)) + copy(m.Severity, model.Severity) + m.GracePeriod = model.GracePeriod + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.DisplayName = model.DisplayName + + m.ProductVersion = model.ProductVersion + + m.PatchType = make([]string, len(model.PatchType)) + copy(m.PatchType, model.PatchType) + nn, e = model.PatchSelection.UnmarshalPolymorphicJSON(model.PatchSelection.JsonData) + if e != nil { + return + } + if nn != nil { + m.PatchSelection = nn.(PatchSelectionDetails) + } else { + m.PatchSelection = nil + } + + m.CompartmentId = model.CompartmentId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_request_response.go new file mode 100644 index 00000000000..cd4df54716a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_compliance_policy_rule_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateCompliancePolicyRuleRequest wrapper for the CreateCompliancePolicyRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateCompliancePolicyRule.go.html to see an example of how to use CreateCompliancePolicyRuleRequest. +type CreateCompliancePolicyRuleRequest struct { + + // Details for the new CompliancePolicyRule. + CreateCompliancePolicyRuleDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateCompliancePolicyRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateCompliancePolicyRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateCompliancePolicyRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateCompliancePolicyRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateCompliancePolicyRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateCompliancePolicyRuleResponse wrapper for the CreateCompliancePolicyRule operation +type CreateCompliancePolicyRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CompliancePolicyRule instance + CompliancePolicyRule `presentIn:"body"` + + // URL for the created CompliancePolicyRule. The CompliancePolicyRule OCID is generated after this request is sent. + Location *string `presentIn:"header" name:"location"` + + // Same as location. + ContentLocation *string `presentIn:"header" name:"content-location"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateCompliancePolicyRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateCompliancePolicyRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_details.go index f092efdd349..3879c79db57 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_request_response.go index 6af78f11dca..5a52fc4198d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_credential_request_response.go @@ -21,7 +21,7 @@ type CreateFleetCredentialRequest struct { // Details for the new FleetCredential. CreateFleetCredentialDetails `contributesTo:"body"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_details.go index 983948f4ce5..c22dd4504bc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -22,7 +21,11 @@ type CreateFleetDetails struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Type of the Fleet + // Type of the Fleet. + // PRODUCT - A fleet of product-specific resources for a product type. + // ENVIRONMENT - A fleet of environment-specific resources for a product stack. + // GROUP - A fleet of a fleet of either environment or product fleets. + // GENERIC - A fleet of resources selected dynamically or manually for reporting purposes FleetType FleetFleetTypeEnum `mandatory:"true" json:"fleetType"` // A user-friendly name. Does not have to be unique, and it's changeable. @@ -34,29 +37,36 @@ type CreateFleetDetails struct { // Avoid entering confidential information. Description *string `mandatory:"false" json:"description"` - // Products associated with the Fleet + // Products associated with the Fleet. Products []string `mandatory:"false" json:"products"` - // Application Type associated with the Fleet.Applicable for Environment fleet types. + // Product stack associated with the Fleet. + // Applicable for ENVIRONMENT fleet types. ApplicationType *string `mandatory:"false" json:"applicationType"` - // Environment Type associated with the Fleet.Applicable for Environment fleet types. + // Environment Type associated with the Fleet. + // Applicable for ENVIRONMENT fleet types. EnvironmentType *string `mandatory:"false" json:"environmentType"` - // Group Type associated with Group Fleet.Applicable for Group fleet types. + // Group Type associated with Group Fleet. GroupType FleetGroupTypeEnum `mandatory:"false" json:"groupType,omitempty"` - // Type of resource selection in a fleet + // Type of resource selection in a Fleet. + // Select resources manually or select resources based on rules. ResourceSelectionType FleetResourceSelectionTypeEnum `mandatory:"false" json:"resourceSelectionType,omitempty"` RuleSelectionCriteria *SelectionCriteria `mandatory:"false" json:"ruleSelectionCriteria"` NotificationPreferences *NotificationPreferences `mandatory:"false" json:"notificationPreferences"` - // Resources to be added during fleet creation when Resource selection type is Manual. + // Resources associated with the Fleet if resourceSelectionType is MANUAL. Resources []AssociatedFleetResourceDetails `mandatory:"false" json:"resources"` - // A value which represents if auto confirming of the targets can be enabled + // Credentials associated with the Fleet. + Credentials []AssociatedFleetCredentialDetails `mandatory:"false" json:"credentials"` + + // A value that represents if auto-confirming of the targets can be enabled. + // This will allow targets to be auto-confirmed in the fleet without manual intervention. IsTargetAutoConfirm *bool `mandatory:"false" json:"isTargetAutoConfirm"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_details.go index fcd5133703e..25753e2d649 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,16 +15,16 @@ import ( "strings" ) -// CreateFleetPropertyDetails The information about new FleetProperty. +// CreateFleetPropertyDetails The information about new Property to manage fleet metadata details. type CreateFleetPropertyDetails struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Value of the Property + // Value of the Property. Value *string `mandatory:"true" json:"value"` - // Property Id. + // OCID referring to global level metadata property. PropertyId *string `mandatory:"true" json:"propertyId"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_request_response.go index a51d14bbd10..217eda5e618 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_property_request_response.go @@ -21,7 +21,7 @@ type CreateFleetPropertyRequest struct { // Details for the new FleetProperty. CreateFleetPropertyDetails `contributesTo:"body"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_details.go index 116e587e9a0..d607a9e8208 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// CreateFleetResourceDetails The information about new FleetResource. +// CreateFleetResourceDetails The information about the resource to be added to the fleet. type CreateFleetResourceDetails struct { // The OCID of the resource. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_request_response.go index 8bdaaca021c..09aad9e67a4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_fleet_resource_request_response.go @@ -21,7 +21,7 @@ type CreateFleetResourceRequest struct { // Details for the new FleetResource. CreateFleetResourceDetails `contributesTo:"body"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_maintenance_window_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_maintenance_window_details.go index 83f7717dfae..4b335538c9f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_maintenance_window_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_maintenance_window_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,13 +15,14 @@ import ( "strings" ) -// CreateMaintenanceWindowDetails The information about new MaintenanceWindow. +// CreateMaintenanceWindowDetails The information about the new MaintenanceWindow. type CreateMaintenanceWindowDetails struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Duration if schedule type is Custom + // Duration of the maintenance window. + // Specify how long the maintenance window remains open. Duration *string `mandatory:"true" json:"duration"` // A user-friendly name. Does not have to be unique, and it's changeable. @@ -35,21 +35,24 @@ type CreateMaintenanceWindowDetails struct { Description *string `mandatory:"false" json:"description"` // Does the maintenenace window cause outage? + // An outage indicates whether a maintenance window can consider operations that require downtime. + // It means a period when the application is not accessible. IsOutage *bool `mandatory:"false" json:"isOutage"` // Type of maintenenace window MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` - // Start time of schedule + // Specify the date and time of the day that the maintenance window starts. TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` - // Is this is a recurring maintenance window + // Is this a recurring maintenance window? IsRecurring *bool `mandatory:"false" json:"isRecurring"` - // Recurrence rule specification if recurring + // Recurrence rule specification if maintenance window recurring. + // Specify the frequency of running the maintenance window. Recurrences *string `mandatory:"false" json:"recurrences"` - // Task initiation cutoff + // Task initiation cutoff time for the maintenance window. TaskInitiationCutoff *int `mandatory:"false" json:"taskInitiationCutoff"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_details.go index ad71dbc07a6..6ed5157ce56 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -22,10 +21,12 @@ type CreateOnboardingDetails struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // A value determining FAMS tag is enabled or not + // A value determining if the Fleet Application Management tagging is enabled or not. + // Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. IsFamsTagEnabled *bool `mandatory:"false" json:"isFamsTagEnabled"` - // A value determining if cost tracking tag is enabled or not + // A value determining if the cost tracking tag is enabled or not. + // Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. IsCostTrackingTagEnabled *bool `mandatory:"false" json:"isCostTrackingTagEnabled"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_request_response.go index 58826983758..0d02c68c455 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_onboarding_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateOnboarding.go.html to see an example of how to use CreateOnboardingRequest. type CreateOnboardingRequest struct { - // Details for onboarding FAMS. + // Details for onboarding Fleet Application Management. CreateOnboardingDetails `contributesTo:"body"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_details.go new file mode 100644 index 00000000000..d560a2e2a1c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_details.go @@ -0,0 +1,128 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePatchDetails The information about new Patch. +type CreatePatchDetails struct { + + // A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + // Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + PatchType *PatchType `mandatory:"true" json:"patchType"` + + // Patch Severity. + Severity PatchSeverityEnum `mandatory:"true" json:"severity"` + + // Date when the patch was released. + TimeReleased *common.SDKTime `mandatory:"true" json:"timeReleased"` + + ArtifactDetails ArtifactDetails `mandatory:"true" json:"artifactDetails"` + + Product *PatchProduct `mandatory:"true" json:"product"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Dependent Patches for this patch. + DependentPatches []DependentPatchDetails `mandatory:"false" json:"dependentPatches"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreatePatchDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePatchDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchSeverityEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetPatchSeverityEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreatePatchDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + DependentPatches []DependentPatchDetails `json:"dependentPatches"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + Name *string `json:"name"` + PatchType *PatchType `json:"patchType"` + Severity PatchSeverityEnum `json:"severity"` + TimeReleased *common.SDKTime `json:"timeReleased"` + ArtifactDetails artifactdetails `json:"artifactDetails"` + Product *PatchProduct `json:"product"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.DependentPatches = make([]DependentPatchDetails, len(model.DependentPatches)) + copy(m.DependentPatches, model.DependentPatches) + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.Name = model.Name + + m.PatchType = model.PatchType + + m.Severity = model.Severity + + m.TimeReleased = model.TimeReleased + + nn, e = model.ArtifactDetails.UnmarshalPolymorphicJSON(model.ArtifactDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ArtifactDetails = nn.(ArtifactDetails) + } else { + m.ArtifactDetails = nil + } + + m.Product = model.Product + + m.CompartmentId = model.CompartmentId + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_request_response.go new file mode 100644 index 00000000000..837267fe37e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_patch_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePatchRequest wrapper for the CreatePatch operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreatePatch.go.html to see an example of how to use CreatePatchRequest. +type CreatePatchRequest struct { + + // Details for the new Patch. + CreatePatchDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePatchRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePatchRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePatchRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePatchRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePatchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePatchResponse wrapper for the CreatePatch operation +type CreatePatchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Patch instance + Patch `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePatchResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePatchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_details.go new file mode 100644 index 00000000000..722b2380541 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_details.go @@ -0,0 +1,84 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreatePlatformConfigurationDetails The information about new PlatformConfiguration. +type CreatePlatformConfigurationDetails struct { + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + ConfigCategoryDetails ConfigCategoryDetails `mandatory:"true" json:"configCategoryDetails"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` +} + +func (m CreatePlatformConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreatePlatformConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *CreatePlatformConfigurationDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + Description *string `json:"description"` + CompartmentId *string `json:"compartmentId"` + ConfigCategoryDetails configcategorydetails `json:"configCategoryDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.Description = model.Description + + m.CompartmentId = model.CompartmentId + + nn, e = model.ConfigCategoryDetails.UnmarshalPolymorphicJSON(model.ConfigCategoryDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConfigCategoryDetails = nn.(ConfigCategoryDetails) + } else { + m.ConfigCategoryDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_request_response.go new file mode 100644 index 00000000000..9bd4809af6f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_platform_configuration_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreatePlatformConfigurationRequest wrapper for the CreatePlatformConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreatePlatformConfiguration.go.html to see an example of how to use CreatePlatformConfigurationRequest. +type CreatePlatformConfigurationRequest struct { + + // Details for the new PlatformConfiguration. + CreatePlatformConfigurationDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreatePlatformConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreatePlatformConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreatePlatformConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreatePlatformConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreatePlatformConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreatePlatformConfigurationResponse wrapper for the CreatePlatformConfiguration operation +type CreatePlatformConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PlatformConfiguration instance + PlatformConfiguration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreatePlatformConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreatePlatformConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_property_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_property_details.go index 591e5454725..c0619b25662 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_property_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_property_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -22,10 +21,10 @@ type CreatePropertyDetails struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Text selection of the category + // Text selection of the property. Selection SelectionEnum `mandatory:"true" json:"selection"` - // Format of the value + // Format of the value. ValueType ValueTypeEnum `mandatory:"true" json:"valueType"` // A user-friendly name. Does not have to be unique, and it's changeable. @@ -33,7 +32,7 @@ type CreatePropertyDetails struct { // Example: `My new resource` DisplayName *string `mandatory:"false" json:"displayName"` - // Values of the property (must be a single value if selection = 'single choice') + // Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). Values []string `mandatory:"false" json:"values"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_details.go new file mode 100644 index 00000000000..1f95ae4bf09 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_details.go @@ -0,0 +1,82 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateRunbookDetails The information about new Runbook. +type CreateRunbookDetails struct { + + // Type of runbook structure. + RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"true" json:"runbookRelevance"` + + // The lifecycle operation performed by the task. + Operation *string `mandatory:"true" json:"operation"` + + // The OS type for the runbook. + OsType OsTypeEnum `mandatory:"true" json:"osType"` + + Associations *Associations `mandatory:"true" json:"associations"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The platform of the runbook. + Platform *string `mandatory:"false" json:"platform"` + + // Is the runbook default? + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // Estimated time to successfully complete the runbook execution + EstimatedTime *string `mandatory:"false" json:"estimatedTime"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateRunbookDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateRunbookDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRunbookRunbookRelevanceEnum(string(m.RunbookRelevance)); !ok && m.RunbookRelevance != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RunbookRelevance: %s. Supported values are: %s.", m.RunbookRelevance, strings.Join(GetRunbookRunbookRelevanceEnumStringValues(), ","))) + } + if _, ok := GetMappingOsTypeEnum(string(m.OsType)); !ok && m.OsType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsType: %s. Supported values are: %s.", m.OsType, strings.Join(GetOsTypeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_request_response.go new file mode 100644 index 00000000000..86e32f94385 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_runbook_request_response.go @@ -0,0 +1,109 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateRunbookRequest wrapper for the CreateRunbook operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateRunbook.go.html to see an example of how to use CreateRunbookRequest. +type CreateRunbookRequest struct { + + // Details for the new Runbook. + CreateRunbookDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateRunbookRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateRunbookRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateRunbookRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateRunbookRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateRunbookRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateRunbookResponse wrapper for the CreateRunbook operation +type CreateRunbookResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Runbook instance + Runbook `presentIn:"body"` + + // URL for the created runbook, the runbook id will be generated after this request is sent. + Location *string `presentIn:"header" name:"location"` + + // Same as location + ContentLocation *string `presentIn:"header" name:"content-location"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateRunbookResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateRunbookResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_scheduler_definition_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_scheduler_definition_details.go index ce3849586ed..ab165ad0176 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_scheduler_definition_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_scheduler_definition_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_details.go new file mode 100644 index 00000000000..bba3d696f59 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CreateTaskRecordDetails The information about new Task. +type CreateTaskRecordDetails struct { + Details *Details `mandatory:"true" json:"details"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m CreateTaskRecordDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CreateTaskRecordDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_request_response.go new file mode 100644 index 00000000000..0234fd1c829 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/create_task_record_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// CreateTaskRecordRequest wrapper for the CreateTaskRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateTaskRecord.go.html to see an example of how to use CreateTaskRecordRequest. +type CreateTaskRecordRequest struct { + + // Details for the new TaskRecord. + CreateTaskRecordDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request CreateTaskRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request CreateTaskRecordRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request CreateTaskRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request CreateTaskRecordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request CreateTaskRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// CreateTaskRecordResponse wrapper for the CreateTaskRecord operation +type CreateTaskRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The TaskRecord instance + TaskRecord `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response CreateTaskRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response CreateTaskRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_config_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_config_category_details.go new file mode 100644 index 00000000000..51f3cf24566 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_config_category_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// CredentialConfigCategoryDetails Credential Config Category Details. +// Defines credential placeholders deemed necessary by product standards later mapped and used by lifecycle management operations for the supported products. +type CredentialConfigCategoryDetails struct { +} + +func (m CredentialConfigCategoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m CredentialConfigCategoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m CredentialConfigCategoryDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeCredentialConfigCategoryDetails CredentialConfigCategoryDetails + s := struct { + DiscriminatorParam string `json:"configCategory"` + MarshalTypeCredentialConfigCategoryDetails + }{ + "CREDENTIAL", + (MarshalTypeCredentialConfigCategoryDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_details.go index 75c2de00002..722218afce7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,7 @@ import ( "strings" ) -// CredentialDetails Credential Details +// CredentialDetails Credential Details. type CredentialDetails interface { } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_entity_specific_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_entity_specific_details.go index 30e58c1f031..4b0ddab2559 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_entity_specific_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/credential_entity_specific_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,7 @@ import ( "strings" ) -// CredentialEntitySpecificDetails Credential Details +// CredentialEntitySpecificDetails Credential specific Details. type CredentialEntitySpecificDetails interface { } @@ -55,6 +54,14 @@ func (m *credentialentityspecificdetails) UnmarshalPolymorphicJSON(data []byte) mm := TargetCredentialEntitySpecificDetails{} err = json.Unmarshal(data, &mm) return mm, err + case "FLEET": + mm := FleetCredentialEntitySpecificDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "RESOURCE": + mm := ResourceCredentialEntitySpecificDetails{} + err = json.Unmarshal(data, &mm) + return mm, err default: common.Logf("Recieved unsupported enum value for CredentialEntitySpecificDetails: %s.", m.CredentialLevel) return *m, nil @@ -82,15 +89,21 @@ type CredentialEntitySpecificDetailsCredentialLevelEnum string // Set of constants representing the allowable values for CredentialEntitySpecificDetailsCredentialLevelEnum const ( - CredentialEntitySpecificDetailsCredentialLevelTarget CredentialEntitySpecificDetailsCredentialLevelEnum = "TARGET" + CredentialEntitySpecificDetailsCredentialLevelFleet CredentialEntitySpecificDetailsCredentialLevelEnum = "FLEET" + CredentialEntitySpecificDetailsCredentialLevelResource CredentialEntitySpecificDetailsCredentialLevelEnum = "RESOURCE" + CredentialEntitySpecificDetailsCredentialLevelTarget CredentialEntitySpecificDetailsCredentialLevelEnum = "TARGET" ) var mappingCredentialEntitySpecificDetailsCredentialLevelEnum = map[string]CredentialEntitySpecificDetailsCredentialLevelEnum{ - "TARGET": CredentialEntitySpecificDetailsCredentialLevelTarget, + "FLEET": CredentialEntitySpecificDetailsCredentialLevelFleet, + "RESOURCE": CredentialEntitySpecificDetailsCredentialLevelResource, + "TARGET": CredentialEntitySpecificDetailsCredentialLevelTarget, } var mappingCredentialEntitySpecificDetailsCredentialLevelEnumLowerCase = map[string]CredentialEntitySpecificDetailsCredentialLevelEnum{ - "target": CredentialEntitySpecificDetailsCredentialLevelTarget, + "fleet": CredentialEntitySpecificDetailsCredentialLevelFleet, + "resource": CredentialEntitySpecificDetailsCredentialLevelResource, + "target": CredentialEntitySpecificDetailsCredentialLevelTarget, } // GetCredentialEntitySpecificDetailsCredentialLevelEnumValues Enumerates the set of values for CredentialEntitySpecificDetailsCredentialLevelEnum @@ -105,6 +118,8 @@ func GetCredentialEntitySpecificDetailsCredentialLevelEnumValues() []CredentialE // GetCredentialEntitySpecificDetailsCredentialLevelEnumStringValues Enumerates the set of values in String for CredentialEntitySpecificDetailsCredentialLevelEnum func GetCredentialEntitySpecificDetailsCredentialLevelEnumStringValues() []string { return []string{ + "FLEET", + "RESOURCE", "TARGET", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_compliance_policy_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_compliance_policy_rule_request_response.go new file mode 100644 index 00000000000..a092e5d292a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_compliance_policy_rule_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteCompliancePolicyRuleRequest wrapper for the DeleteCompliancePolicyRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteCompliancePolicyRule.go.html to see an example of how to use DeleteCompliancePolicyRuleRequest. +type DeleteCompliancePolicyRuleRequest struct { + + // unique CompliancePolicyRule identifier. + CompliancePolicyRuleId *string `mandatory:"true" contributesTo:"path" name:"compliancePolicyRuleId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteCompliancePolicyRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteCompliancePolicyRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteCompliancePolicyRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteCompliancePolicyRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteCompliancePolicyRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteCompliancePolicyRuleResponse wrapper for the DeleteCompliancePolicyRule operation +type DeleteCompliancePolicyRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteCompliancePolicyRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteCompliancePolicyRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_credential_request_response.go index e55a86f06c1..ebafe82ce85 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_credential_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_credential_request_response.go @@ -21,7 +21,7 @@ type DeleteFleetCredentialRequest struct { // unique FleetCredential identifier FleetCredentialId *string `mandatory:"true" contributesTo:"path" name:"fleetCredentialId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_property_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_property_request_response.go index 474447f9b93..331e6383802 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_property_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_property_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleetProperty.go.html to see an example of how to use DeleteFleetPropertyRequest. type DeleteFleetPropertyRequest struct { - // unique FleetProperty identifier + // unique FleetProperty identifier. FleetPropertyId *string `mandatory:"true" contributesTo:"path" name:"fleetPropertyId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_request_response.go index 45078cd58dd..e812ef539e3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteFleet.go.html to see an example of how to use DeleteFleetRequest. type DeleteFleetRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_resource_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_resource_request_response.go index 98e2363b587..75147e6b90b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_resource_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_fleet_resource_request_response.go @@ -21,7 +21,7 @@ type DeleteFleetResourceRequest struct { // unique FleetResource identifier FleetResourceId *string `mandatory:"true" contributesTo:"path" name:"fleetResourceId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_onboarding_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_onboarding_request_response.go new file mode 100644 index 00000000000..d56e038a03b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_onboarding_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteOnboardingRequest wrapper for the DeleteOnboarding operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteOnboarding.go.html to see an example of how to use DeleteOnboardingRequest. +type DeleteOnboardingRequest struct { + + // A filter to return resources whose Onboarding identifier matches the given identifier. + OnboardingId *string `mandatory:"true" contributesTo:"path" name:"onboardingId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteOnboardingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteOnboardingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteOnboardingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteOnboardingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteOnboardingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteOnboardingResponse wrapper for the DeleteOnboarding operation +type DeleteOnboardingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteOnboardingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteOnboardingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_patch_request_response.go new file mode 100644 index 00000000000..0245485e0ee --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_patch_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePatchRequest wrapper for the DeletePatch operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeletePatch.go.html to see an example of how to use DeletePatchRequest. +type DeletePatchRequest struct { + + // unique Patch identifier + PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePatchRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePatchRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePatchRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePatchRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePatchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePatchResponse wrapper for the DeletePatch operation +type DeletePatchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePatchResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePatchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_platform_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_platform_configuration_request_response.go new file mode 100644 index 00000000000..06c2254e978 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_platform_configuration_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeletePlatformConfigurationRequest wrapper for the DeletePlatformConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeletePlatformConfiguration.go.html to see an example of how to use DeletePlatformConfigurationRequest. +type DeletePlatformConfigurationRequest struct { + + // unique PlatformConfiguration identifier + PlatformConfigurationId *string `mandatory:"true" contributesTo:"path" name:"platformConfigurationId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeletePlatformConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeletePlatformConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeletePlatformConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeletePlatformConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeletePlatformConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeletePlatformConfigurationResponse wrapper for the DeletePlatformConfiguration operation +type DeletePlatformConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeletePlatformConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeletePlatformConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_runbook_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_runbook_request_response.go new file mode 100644 index 00000000000..c4c408f2bb8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_runbook_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteRunbookRequest wrapper for the DeleteRunbook operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteRunbook.go.html to see an example of how to use DeleteRunbookRequest. +type DeleteRunbookRequest struct { + + // Unique Runbook identifier + RunbookId *string `mandatory:"true" contributesTo:"path" name:"runbookId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteRunbookRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteRunbookRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteRunbookRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteRunbookRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteRunbookRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteRunbookResponse wrapper for the DeleteRunbook operation +type DeleteRunbookResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteRunbookResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteRunbookResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_task_record_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_task_record_request_response.go new file mode 100644 index 00000000000..a4c0fbf1b33 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/delete_task_record_request_response.go @@ -0,0 +1,97 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// DeleteTaskRecordRequest wrapper for the DeleteTaskRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteTaskRecord.go.html to see an example of how to use DeleteTaskRecordRequest. +type DeleteTaskRecordRequest struct { + + // unique TaskDetail identifier + TaskRecordId *string `mandatory:"true" contributesTo:"path" name:"taskRecordId"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request DeleteTaskRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request DeleteTaskRecordRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request DeleteTaskRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request DeleteTaskRecordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request DeleteTaskRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// DeleteTaskRecordResponse wrapper for the DeleteTaskRecord operation +type DeleteTaskRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response DeleteTaskRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response DeleteTaskRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/dependent_patch_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/dependent_patch_details.go new file mode 100644 index 00000000000..549f628894e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/dependent_patch_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// DependentPatchDetails Dependent Patch Details. +type DependentPatchDetails struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` +} + +func (m DependentPatchDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m DependentPatchDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/details.go index 9deaaacaa20..42f7d13f5b5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -19,6 +18,7 @@ import ( // Details The details of the task. type Details struct { + ExecutionDetails ExecutionDetails `mandatory:"true" json:"executionDetails"` // The OS for the task OsType OsTypeEnum `mandatory:"true" json:"osType"` @@ -26,12 +26,17 @@ type Details struct { // The scope of the task Scope TaskScopeEnum `mandatory:"true" json:"scope"` - ExecutionDetails ExecutionDetails `mandatory:"false" json:"executionDetails"` - // The platform of the runbook. Platform *string `mandatory:"false" json:"platform"` Properties *Properties `mandatory:"false" json:"properties"` + + // Is this a discovery output task? + IsDiscoveryOutputTask *bool `mandatory:"false" json:"isDiscoveryOutputTask"` + + // Is this an Apply Subject Task? + // Set this to true for a Patch Execution Task which applies patches(subjects) on a target. + IsApplySubjectTask *bool `mandatory:"false" json:"isApplySubjectTask"` } func (m Details) String() string { @@ -59,11 +64,13 @@ func (m Details) ValidateEnumValue() (bool, error) { // UnmarshalJSON unmarshals from json func (m *Details) UnmarshalJSON(data []byte) (e error) { model := struct { - ExecutionDetails executiondetails `json:"executionDetails"` - Platform *string `json:"platform"` - Properties *Properties `json:"properties"` - OsType OsTypeEnum `json:"osType"` - Scope TaskScopeEnum `json:"scope"` + Platform *string `json:"platform"` + Properties *Properties `json:"properties"` + IsDiscoveryOutputTask *bool `json:"isDiscoveryOutputTask"` + IsApplySubjectTask *bool `json:"isApplySubjectTask"` + ExecutionDetails executiondetails `json:"executionDetails"` + OsType OsTypeEnum `json:"osType"` + Scope TaskScopeEnum `json:"scope"` }{} e = json.Unmarshal(data, &model) @@ -71,6 +78,14 @@ func (m *Details) UnmarshalJSON(data []byte) (e error) { return } var nn interface{} + m.Platform = model.Platform + + m.Properties = model.Properties + + m.IsDiscoveryOutputTask = model.IsDiscoveryOutputTask + + m.IsApplySubjectTask = model.IsApplySubjectTask + nn, e = model.ExecutionDetails.UnmarshalPolymorphicJSON(model.ExecutionDetails.JsonData) if e != nil { return @@ -81,10 +96,6 @@ func (m *Details) UnmarshalJSON(data []byte) (e error) { m.ExecutionDetails = nil } - m.Platform = model.Platform - - m.Properties = model.Properties - m.OsType = model.OsType m.Scope = model.Scope diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/discovered_target.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/discovered_target.go index 1235e0b6a77..6f20a57f6f4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/discovered_target.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/discovered_target.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -19,7 +18,7 @@ import ( // DiscoveredTarget A target that is discovered by the Software discovery process. type DiscoveredTarget struct { - // OCID of the Target. + // ID of the Target. Can be the target name if a separate ID is not available. TargetId *string `mandatory:"true" json:"targetId"` // Target Name. @@ -28,10 +27,10 @@ type DiscoveredTarget struct { // Product that the target belongs to. Product *string `mandatory:"true" json:"product"` - // Unique key that identify the resource that target belongs to. + // Unique key that identifies the resource that the target belongs to. ResourceId *string `mandatory:"true" json:"resourceId"` - // Current version of Target + // Current version of the target. Version *string `mandatory:"false" json:"version"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_details.go new file mode 100644 index 00000000000..58cd007dcd9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnableLatestPolicyDetails The information to be updated. +type EnableLatestPolicyDetails struct { + + // A value determining if latest Fleet Application Management policies should be enabled + CanLatestFamsPoliciesBeEnabled *bool `mandatory:"false" json:"canLatestFamsPoliciesBeEnabled"` +} + +func (m EnableLatestPolicyDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnableLatestPolicyDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_request_response.go new file mode 100644 index 00000000000..9ce01c40c7a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/enable_latest_policy_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// EnableLatestPolicyRequest wrapper for the EnableLatestPolicy operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/EnableLatestPolicy.go.html to see an example of how to use EnableLatestPolicyRequest. +type EnableLatestPolicyRequest struct { + + // A filter to return resources whose Onboarding identifier matches the given identifier. + OnboardingId *string `mandatory:"true" contributesTo:"path" name:"onboardingId"` + + // The information to be updated. + EnableLatestPolicyDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request EnableLatestPolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request EnableLatestPolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request EnableLatestPolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request EnableLatestPolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request EnableLatestPolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// EnableLatestPolicyResponse wrapper for the EnableLatestPolicy operation +type EnableLatestPolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response EnableLatestPolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response EnableLatestPolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/entity_execution_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/entity_execution_details.go index 78f6f21605a..9e8fb9c9629 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/entity_execution_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/entity_execution_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,25 +15,26 @@ import ( "strings" ) -// EntityExecutionDetails Activity Resource and execution details including outcome. +// EntityExecutionDetails Resource level execution status and target associations. type EntityExecutionDetails struct { - // Resource Identifier associated with the Work Request + // Resource Identifier associated with the Work Request. ResourceId *string `mandatory:"true" json:"resourceId"` - // Status of the Job at Resource Level + // Status of the Job at Resource Level. Status JobStatusEnum `mandatory:"true" json:"status"` - // Resource Display Name + // Resource Display Name. ResourceDisplayName *string `mandatory:"false" json:"resourceDisplayName"` - // Description of the Work Request + // Description of the Resource Execution status. + // If there are any errors, this can also include a short error message. Description *string `mandatory:"false" json:"description"` - // The sequence of the Resource + // The sequence of the Resource. Sequence *string `mandatory:"false" json:"sequence"` - // Targets associated. + // Targets associated with the resource. Targets []ActivityResourceTarget `mandatory:"false" json:"targets"` // The time the task started for the resource. An RFC3339 formatted datetime string diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/environment_config_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/environment_config_category_details.go new file mode 100644 index 00000000000..c349db19e5a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/environment_config_category_details.go @@ -0,0 +1,53 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// EnvironmentConfigCategoryDetails Environment Config Category Details. +// Defines the supported prioritization associated with resources based on the implementation phase of the applications hosted by them. +// For example, your organization might support development, beta, or production environment types. +type EnvironmentConfigCategoryDetails struct { +} + +func (m EnvironmentConfigCategoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m EnvironmentConfigCategoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m EnvironmentConfigCategoryDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeEnvironmentConfigCategoryDetails EnvironmentConfigCategoryDetails + s := struct { + DiscriminatorParam string `json:"configCategory"` + MarshalTypeEnvironmentConfigCategoryDetails + }{ + "ENVIRONMENT", + (MarshalTypeEnvironmentConfigCategoryDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution.go index e874e70f483..0c562c68ebe 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -19,38 +18,49 @@ import ( // Execution Task Execution associated with the Job. type Execution struct { - // Unique Id assocaited with the Task Execution + // Unique Id associated with the task execution. Id *string `mandatory:"true" json:"id"` // Status of the Task Status JobStatusEnum `mandatory:"true" json:"status"` - // The OCID of taskRecord + // The OCID of taskRecord. TaskRecordId *string `mandatory:"false" json:"taskRecordId"` - // Name of the step + // Name of the step. StepName *string `mandatory:"false" json:"stepName"` - // Unique process reference identifier returned by the execution client + // Unique process-reference identifier returned by the execution client. + // In some cases, this can be a runcommand OCID. ProcessReferenceId *string `mandatory:"false" json:"processReferenceId"` - // The sequence of the task + // The sequence of the task. Sequence *string `mandatory:"false" json:"sequence"` - // Subjects which are tied to the task + // Subjects that are tied to the task. Subjects []string `mandatory:"false" json:"subjects"` Outcome *Outcome `mandatory:"false" json:"outcome"` - // Target associated with the execution + // Target associated with the execution. TargetId *string `mandatory:"false" json:"targetId"` - // The time the task started. An RFC3339 formatted datetime string + // The time the task started. An RFC3339 formatted datetime string. TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - // The time the task ended. An RFC3339 formatted datetime string + // The time the task ended. An RFC3339 formatted datetime string. TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + // Is this a rollback task? + IsRollbackTask *bool `mandatory:"false" json:"isRollbackTask"` + + // Description of the Execution status. + // If there are any errors, this can also include a short error message. + Description *string `mandatory:"false" json:"description"` + + // Resource Identifier associated with the Work Request. + ResourceId *string `mandatory:"false" json:"resourceId"` + // System tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_collection.go index 9ba7c482df4..be4c8201a7f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// ExecutionCollection Results of a +// ExecutionCollection A collection of ExecutionSummary. type ExecutionCollection struct { // List of Resource Level Executions. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_details.go index 1e32a036aec..ab6319c9af5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,7 @@ import ( "strings" ) -// ExecutionDetails Content Source Details +// ExecutionDetails Execution details. type ExecutionDetails interface { } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_summary.go index 93d708c7b50..77cca74b8db 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,36 +15,47 @@ import ( "strings" ) -// ExecutionSummary Task associated with the Job. +// ExecutionSummary A task associated with the Job. type ExecutionSummary struct { - // Unique Id assocaited with the Task Execution + // Unique Id associated with the task execution. Id *string `mandatory:"true" json:"id"` - // Status of the Task + // Status of the Task. Status JobStatusEnum `mandatory:"true" json:"status"` - // The OCID of taskRecord + // The OCID of taskRecord. TaskRecordId *string `mandatory:"false" json:"taskRecordId"` - // Name of the Step + // Name of the Step. StepName *string `mandatory:"false" json:"stepName"` - // Unique process reference identifier returned by the execution client + // Unique process-reference identifier returned by the execution client. + // In some cases, this can be a runcommand OCID. ProcessReferenceId *string `mandatory:"false" json:"processReferenceId"` - // The sequence of the task + // The sequence of the task. Sequence *string `mandatory:"false" json:"sequence"` - // Target associated with the execution + // Target associated with the execution. TargetId *string `mandatory:"false" json:"targetId"` - // The time the task started. An RFC3339 formatted datetime string + // The time the task started. An RFC3339 formatted datetime string. TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - // The time the task ended. An RFC3339 formatted datetime string + // The time the task ended. An RFC3339 formatted datetime string. TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + // Is this a rollback task? + IsRollbackTask *bool `mandatory:"false" json:"isRollbackTask"` + + // Description of the Execution status. + // If there are any errors, this can also include a short error message. + Description *string `mandatory:"false" json:"description"` + + // Resource Identifier associated with the Work Request. + ResourceId *string `mandatory:"false" json:"resourceId"` + // System tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_workflow_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_workflow_details.go index 37a8e6c1dce..040ef6ee684 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_workflow_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/execution_workflow_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// ExecutionWorkflowDetails Execution Workflow. +// ExecutionWorkflowDetails Execution Workflow details. type ExecutionWorkflowDetails struct { // Execution Workflow for the runbook. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_details.go new file mode 100644 index 00000000000..28aff6443fe --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_details.go @@ -0,0 +1,57 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ExportComplianceReportDetails Details for generating Compliance Report +type ExportComplianceReportDetails struct { + + // The OCID of the compartment. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The OCID of the entity for which the compliance is calculated.Ex.FleetId + EntityId *string `mandatory:"false" json:"entityId"` + + // The OCID to identify the resource. + ResourceId *string `mandatory:"false" json:"resourceId"` + + // Product Stack. + ProductStack *string `mandatory:"false" json:"productStack"` + + // Product Name. + ProductName *string `mandatory:"false" json:"productName"` + + // Last known compliance state of target. + ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` +} + +func (m ExportComplianceReportDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ExportComplianceReportDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingComplianceStateEnum(string(m.ComplianceState)); !ok && m.ComplianceState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ComplianceState: %s. Supported values are: %s.", m.ComplianceState, strings.Join(GetComplianceStateEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_request_response.go new file mode 100644 index 00000000000..b56d604fe50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/export_compliance_report_request_response.go @@ -0,0 +1,114 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "io" + "net/http" + "strings" +) + +// ExportComplianceReportRequest wrapper for the ExportComplianceReport operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ExportComplianceReport.go.html to see an example of how to use ExportComplianceReportRequest. +type ExportComplianceReportRequest struct { + + // Details for generating compliance report + ExportComplianceReportDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ExportComplianceReportRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ExportComplianceReportRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ExportComplianceReportRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ExportComplianceReportRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ExportComplianceReportRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ExportComplianceReportResponse wrapper for the ExportComplianceReport operation +type ExportComplianceReportResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The io.ReadCloser instance + Content io.ReadCloser `presentIn:"body" encoding:"binary"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // The content size of the body in bytes. + ContentLength *int64 `presentIn:"header" name:"content-length"` + + // The content type of the body. + ContentType *string `presentIn:"header" name:"content-type"` +} + +func (response ExportComplianceReportResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ExportComplianceReportResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet.go index 83c37ec8d46..c2819245dc5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// Fleet Description of Fleet. +// Fleet A fleet is a collection or grouping of resources based on criteria. type Fleet struct { // The OCID of the resource. @@ -34,6 +33,10 @@ type Fleet struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` // Type of the Fleet. + // PRODUCT - A fleet of product-specific resources for a product type. + // ENVIRONMENT - A fleet of environment-specific resources for a product stack. + // GROUP - A fleet of a fleet of either environment or product fleets. + // GENERIC - A fleet of resources selected dynamically or manually for reporting purposes FleetType FleetFleetTypeEnum `mandatory:"true" json:"fleetType"` // The lifecycle state of the Fleet. @@ -57,35 +60,40 @@ type Fleet struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Products associated with the Fleet + // Products associated with the Fleet. Products []string `mandatory:"false" json:"products"` - // Application Type associated with the Fleet.Applicable for ENVIRONMENT fleet types. + // Product stack associated with the Fleet. + // Applicable for ENVIRONMENT fleet types. ApplicationType *string `mandatory:"false" json:"applicationType"` - // Environment Type associated with the Fleet.Applicable for ENVIRONMENT fleet types. + // Environment Type associated with the Fleet. + // Applicable for ENVIRONMENT fleet types. EnvironmentType *string `mandatory:"false" json:"environmentType"` - // Group Type associated with Group Fleet.Applicable for GROUP fleet types. + // Group Type associated with Group Fleet. + // Applicable for GROUP fleet types. GroupType FleetGroupTypeEnum `mandatory:"false" json:"groupType,omitempty"` - // Type of resource selection in a fleet. + // Type of resource selection in a Fleet. + // Select resources manually or select resources based on rules. ResourceSelectionType FleetResourceSelectionTypeEnum `mandatory:"false" json:"resourceSelectionType,omitempty"` RuleSelectionCriteria *SelectionCriteria `mandatory:"false" json:"ruleSelectionCriteria"` NotificationPreferences *NotificationPreferences `mandatory:"false" json:"notificationPreferences"` - // Resources to be added during fleet creation when Resource selection type is Manual. + // Resources associated with the Fleet if resourceSelectionType is MANUAL. Resources []AssociatedFleetResourceDetails `mandatory:"false" json:"resources"` - // Properties to be added during fleet creation. + // Properties associated with the Fleet. Properties []AssociatedFleetPropertyDetails `mandatory:"false" json:"properties"` - // Credentials to be added during fleet creation. + // Credentials associated with the Fleet. Credentials []AssociatedFleetCredentialDetails `mandatory:"false" json:"credentials"` - // A value which represents if auto confirming of the targets can be enabled + // A value that represents if auto-confirming of the targets can be enabled. + // This will allow targets to be auto-confirmed in the fleet without manual intervention. IsTargetAutoConfirm *bool `mandatory:"false" json:"isTargetAutoConfirm"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_collection.go index f1f28b35088..6d731ca1ac2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential.go index c42d7d0e87e..980dbb53663 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,7 @@ import ( "strings" ) -// FleetCredential Description of FleetCredential. +// FleetCredential Credential in Fleet Application Management. type FleetCredential struct { // The unique id of the resource. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_collection.go index 68f13dd23be..126496094cd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_entity_specific_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_entity_specific_details.go new file mode 100644 index 00000000000..0965292a8fd --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_entity_specific_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// FleetCredentialEntitySpecificDetails Fleet credential details. +type FleetCredentialEntitySpecificDetails struct { + + // List of fleet credential variables. + Variables []Variable `mandatory:"false" json:"variables"` +} + +func (m FleetCredentialEntitySpecificDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m FleetCredentialEntitySpecificDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m FleetCredentialEntitySpecificDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeFleetCredentialEntitySpecificDetails FleetCredentialEntitySpecificDetails + s := struct { + DiscriminatorParam string `json:"credentialLevel"` + MarshalTypeFleetCredentialEntitySpecificDetails + }{ + "FLEET", + (MarshalTypeFleetCredentialEntitySpecificDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_summary.go index 5abfc59df71..0655a38379a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_credential_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_collection.go index 37f27fb237a..9727bea33c6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_summary.go index 49d8277c6f8..d9ab1427799 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_product_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// FleetProductSummary Summary of the FleetProduct. +// FleetProductSummary Summary of a product associated with a Fleet. type FleetProductSummary struct { // A user-friendly name. Does not have to be unique, and it's changeable. @@ -29,7 +28,7 @@ type FleetProductSummary struct { // Root Compartment Id. CompartmentId *string `mandatory:"false" json:"compartmentId"` - // Count of targets associated with the Product + // Count of the targets associated with the Product. TargetCount *int `mandatory:"false" json:"targetCount"` // System tags for this resource. Each key is predefined and scoped to a namespace. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property.go index dfc60d74dbf..aa87db54a58 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// FleetProperty Property associated with a Fleet. +// FleetProperty Property to manage fleet metadata details in Fleet Application Management. type FleetProperty struct { // The unique id of the resource. @@ -33,10 +32,10 @@ type FleetProperty struct { // The time this resource was created. An RFC3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // Text selection of the category + // Text selection of the property. SelectionType SelectionEnum `mandatory:"true" json:"selectionType"` - // Format of the value + // Format of the value. ValueType ValueTypeEnum `mandatory:"true" json:"valueType"` // The current state of the FleetProperty. @@ -45,13 +44,13 @@ type FleetProperty struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Value of the Property + // Value of the Property. Value *string `mandatory:"false" json:"value"` - // Property Id Ocid. + // OCID referring to global level metadata property. PropertyId *string `mandatory:"false" json:"propertyId"` - // Values of the category (must be a single value if selection = 'single choice') + // Values of the property (must be a single value if selectionType = 'SINGLE_CHOICE'). AllowedValues []string `mandatory:"false" json:"allowedValues"` // System tags for this resource. Each key is predefined and scoped to a namespace. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_collection.go index 6e4a37e0cce..7642967e319 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// FleetPropertyCollection Results of a fleetProperty search. Contains boh FleetPropertySummary items and other information, such as metadata. +// FleetPropertyCollection Results of a fleetProperty search. Contains both FleetPropertySummary items and other information, such as metadata. type FleetPropertyCollection struct { - // List of fleetPropertys. + // List of fleet properties in Fleet Application Management. Items []FleetPropertySummary `mandatory:"true" json:"items"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_summary.go index dd4d0ba7cf0..bc233f5dbf5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_property_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -25,7 +24,7 @@ type FleetPropertySummary struct { // Tenancy OCID CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Property Id. + // OCID referring to global level metadata property. PropertyId *string `mandatory:"true" json:"propertyId"` // A user-friendly name. Does not have to be unique, and it's changeable. @@ -36,7 +35,7 @@ type FleetPropertySummary struct { // The time this resource was created. An RFC3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` - // Type of the FleetProperty. + // Format of the value. ValueType ValueTypeEnum `mandatory:"true" json:"valueType"` // The current state of the FleetProperty. @@ -45,7 +44,7 @@ type FleetPropertySummary struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Value of the Property + // Value of the Property. Value *string `mandatory:"false" json:"value"` // System tags for this resource. Each key is predefined and scoped to a namespace. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource.go index 07fede59148..d4296a2270e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// FleetResource Resource added to a Fleet. +// FleetResource Resource added to a fleet in Fleet Application Management. type FleetResource struct { // The unique id of the resource. @@ -51,28 +50,31 @@ type FleetResource struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Resource Compartment + // Resource Compartment name. Compartment *string `mandatory:"false" json:"compartment"` - // Compliance State of the Resource + // Compliance State of the Resource. ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` - // Resource Tenancy Name + // Resource Tenancy Name. TenancyName *string `mandatory:"false" json:"tenancyName"` // Count of products within the resource. ProductCount *int `mandatory:"false" json:"productCount"` - // Count of targets within the resource. + // Count of targets within the resource. TargetCount *int `mandatory:"false" json:"targetCount"` - // Product associated with the resource when resource type is fleet.Will only be returned for PRODUCT fleets that are part of a GROUP Fleet + // Product associated with the resource when the resource type is fleet. + // Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. Product *string `mandatory:"false" json:"product"` - // Application Type associated with the resource when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + // Application Type associated with the resource when the resource type is fleet. + // Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. ApplicationType *string `mandatory:"false" json:"applicationType"` - // Environment Type associated with the Fleet when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + // Environment Type associated with the Fleet when the resource type is fleet. + // Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. EnvironmentType *string `mandatory:"false" json:"environmentType"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_collection.go index b627d4cfdcb..75236556132 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// FleetResourceCollection Results of a fleetResource search. Contains boh FleetResourceSummary items and other information, such as metadata. +// FleetResourceCollection Results of a fleetResource search. Contains both FleetResourceSummary items and other information, such as metadata. type FleetResourceCollection struct { // List of fleetResources. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_summary.go index 2e371201567..16094fc1750 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_resource_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -51,28 +50,31 @@ type FleetResourceSummary struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Compliance State of the Resource + // Compliance State of the Resource. ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` - // Resource Tenancy Name + // Resource Tenancy Name. TenancyName *string `mandatory:"false" json:"tenancyName"` - // Resource Compartment + // Resource Compartment name. Compartment *string `mandatory:"false" json:"compartment"` // Count of products within the resource. ProductCount *int `mandatory:"false" json:"productCount"` - // Count of targets within the resource. + // Count of targets within the resource. TargetCount *int `mandatory:"false" json:"targetCount"` - // Product associated with the resource when resource type is fleet.Will only be returned for PRODUCT fleets that are part of a GROUP Fleet + // Product associated with the resource when the resource type is fleet. + // Will only be returned for PRODUCT fleets that are part of a GROUP Fleet. Product *string `mandatory:"false" json:"product"` - // Application Type associated with the resource when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + // Application Type associated with the resource when the resource type is fleet. + // Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. ApplicationType *string `mandatory:"false" json:"applicationType"` - // Environment Type associated with the Fleet when resource type is fleet.Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. + // Environment Type associated with the Fleet when the resource type is fleet. + // Will only be returned for ENVIRONMENT fleets that are part of a GROUP Fleet. EnvironmentType *string `mandatory:"false" json:"environmentType"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_summary.go index 10f53e0da6f..4b47b289877 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// FleetSummary Summary of the Fleet. +// FleetSummary Summary of a Fleet.A fleet is a collection or grouping of resources based on criteria. type FleetSummary struct { // The OCID of the resource. @@ -34,9 +33,13 @@ type FleetSummary struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` // Type of the Fleet. + // PRODUCT - A fleet of product-specific resources for a product type. + // ENVIRONMENT - A fleet of environment-specific resources for a product stack. + // GROUP - A fleet of a fleet of either environment or product fleets. + // GENERIC - A fleet of resources selected dynamically or manually for reporting purposes FleetType FleetFleetTypeEnum `mandatory:"true" json:"fleetType"` - // The current state of the Fleet. + // The lifecycle state of the Fleet. LifecycleState FleetLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` // Associated region @@ -45,7 +48,8 @@ type FleetSummary struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Environment Type associated with the Fleet.Applicable for ENVIRONMENT fleet types. + // Environment Type associated with the Fleet. + // Applicable for ENVIRONMENT fleet types. EnvironmentType *string `mandatory:"false" json:"environmentType"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target.go index 9816329a02f..f4959acd8ab 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// FleetTarget Description of FleetTarget. +// FleetTarget A confirmed target within a fleet. type FleetTarget struct { // The OCID of the resource. @@ -33,7 +32,7 @@ type FleetTarget struct { // The time this resource was created. An RFC3339 formatted datetime string. TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` - // Current version of Target + // Current version of target. Version *string `mandatory:"false" json:"version"` // Product to which the target belongs to. @@ -41,9 +40,18 @@ type FleetTarget struct { Resource *TargetResource `mandatory:"false" json:"resource"` - // Last known compliance state of Target. + // The last known compliance state of the target. ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + // The time when the last successful discovery was made. + TimeOfLastSuccessfulDiscovery *common.SDKTime `mandatory:"false" json:"timeOfLastSuccessfulDiscovery"` + + // The time when last discovery was attempted. + TimeOfLastDiscoveryAttempt *common.SDKTime `mandatory:"false" json:"timeOfLastDiscoveryAttempt"` + + // A boolean flag that represents whether the last discovery attempt was successful. + IsLastDiscoveryAttemptSuccessful *bool `mandatory:"false" json:"isLastDiscoveryAttemptSuccessful"` + // The current state of the FleetTarget. LifecycleState FleetTargetLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_collection.go index 2d66561c68f..da989ffe3b2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_summary.go index 5919a85a678..f1f5a483a58 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleet_target_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// FleetTargetSummary Summary of the FleetTarget. +// FleetTargetSummary Summary of a confirmed target within a fleet. type FleetTargetSummary struct { // The OCID of the resource. @@ -30,7 +29,7 @@ type FleetTargetSummary struct { // Tenancy OCID CompartmentId *string `mandatory:"false" json:"compartmentId"` - // Current version of Target + // Current version of target. Version *string `mandatory:"false" json:"version"` // Product to which the target belongs to. @@ -38,9 +37,18 @@ type FleetTargetSummary struct { Resource *TargetResource `mandatory:"false" json:"resource"` - // Last known compliance state of Target. + // The last known compliance state of the target. ComplianceState ComplianceStateEnum `mandatory:"false" json:"complianceState,omitempty"` + // The time when the last successful discovery was made. + TimeOfLastSuccessfulDiscovery *common.SDKTime `mandatory:"false" json:"timeOfLastSuccessfulDiscovery"` + + // The time when last discovery was attempted. + TimeOfLastDiscoveryAttempt *common.SDKTime `mandatory:"false" json:"timeOfLastDiscoveryAttempt"` + + // A boolean flag that represents whether the last discovery attempt was successful. + IsLastDiscoveryAttemptSuccessful *bool `mandatory:"false" json:"isLastDiscoveryAttemptSuccessful"` + // The current state of the FleetTarget. LifecycleState FleetTargetLifecycleStateEnum `mandatory:"false" json:"lifecycleState,omitempty"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_client.go index 8048f5d83fe..481c98f3cf8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_client.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -92,7 +91,7 @@ func (client *FleetAppsManagementClient) ConfigurationProvider() *common.Configu return client.config } -// CheckResourceTagging Check if FAMS tags can be added for the resources +// CheckResourceTagging Check if Fleet Application Management tags can be added to the resources. // // # See also // @@ -155,7 +154,8 @@ func (client FleetAppsManagementClient) checkResourceTagging(ctx context.Context return response, err } -// ConfirmTargets Confirm targets to be managed for a Fleet.Only targets that are confirmed will be managed by FAMS +// ConfirmTargets Confirm targets to be managed for a Fleet. +// Only targets that are confirmed will be managed by Fleet Application Management // // # See also // @@ -218,8 +218,7 @@ func (client FleetAppsManagementClient) confirmTargets(ctx context.Context, requ return response, err } -// CreateFleet Creates a new fleet instance that includes fleet resources and properties. -// For more information, please see the documentation. +// CreateFleet Create a product, environment, group, or generic type of fleet in Fleet Application Management. // // # See also // @@ -282,7 +281,7 @@ func (client FleetAppsManagementClient) createFleet(ctx context.Context, request return response, err } -// CreateFleetCredential Creates a new FleetCredential. +// CreateFleetCredential Add credentials to a fleet in Fleet Application Management. // // # See also // @@ -345,7 +344,7 @@ func (client FleetAppsManagementClient) createFleetCredential(ctx context.Contex return response, err } -// CreateFleetProperty Creates a new FleetProperty. +// CreateFleetProperty Add an existing global property to a fleet in Fleet Application Management. // // # See also // @@ -408,7 +407,7 @@ func (client FleetAppsManagementClient) createFleetProperty(ctx context.Context, return response, err } -// CreateFleetResource Creates a new FleetResource. +// CreateFleetResource Add resource to a fleet in Fleet Application Management. // // # See also // @@ -471,7 +470,7 @@ func (client FleetAppsManagementClient) createFleetResource(ctx context.Context, return response, err } -// DeleteFleet Deletes a Fleet resource by identifier +// DeleteFleet Delete a fleet in Fleet Application Management. // // # See also // @@ -529,7 +528,7 @@ func (client FleetAppsManagementClient) deleteFleet(ctx context.Context, request return response, err } -// DeleteFleetCredential Deletes a FleetCredential resource by identifier +// DeleteFleetCredential Delete a credential associated with a fleet product or application in Fleet Application Management. // // # See also // @@ -587,7 +586,7 @@ func (client FleetAppsManagementClient) deleteFleetCredential(ctx context.Contex return response, err } -// DeleteFleetProperty Deletes a FleetProperty resource by identifier +// DeleteFleetProperty Delete a property associated with a fleet in Fleet Application Management. // // # See also // @@ -645,7 +644,7 @@ func (client FleetAppsManagementClient) deleteFleetProperty(ctx context.Context, return response, err } -// DeleteFleetResource Deletes a FleetResource resource by identifier +// DeleteFleetResource Removes a resource from the fleet in Fleet Application Management. // // # See also // @@ -703,7 +702,7 @@ func (client FleetAppsManagementClient) deleteFleetResource(ctx context.Context, return response, err } -// GenerateComplianceReport Request to generate compliance report for a Fleet +// GenerateComplianceReport Generate compliance reports for a Fleet. // // # See also // @@ -766,7 +765,7 @@ func (client FleetAppsManagementClient) generateComplianceReport(ctx context.Con return response, err } -// GetComplianceReport Retrieve compiane report for a Fleet +// GetComplianceReport Retrieve compliance report for a fleet. // // # See also // @@ -824,7 +823,7 @@ func (client FleetAppsManagementClient) getComplianceReport(ctx context.Context, return response, err } -// GetFleet Gets a Fleet by identifier +// GetFleet Get the details of a fleet in Fleet Application Management. // // # See also // @@ -882,7 +881,7 @@ func (client FleetAppsManagementClient) getFleet(ctx context.Context, request co return response, err } -// GetFleetCredential Gets a FleetCredential by identifier +// GetFleetCredential Gets a FleetCredential by identifier. // // # See also // @@ -940,7 +939,7 @@ func (client FleetAppsManagementClient) getFleetCredential(ctx context.Context, return response, err } -// GetFleetProperty Gets a FleetProperty by identifier +// GetFleetProperty Gets a Fleet Property by identifier. // // # See also // @@ -998,7 +997,7 @@ func (client FleetAppsManagementClient) getFleetProperty(ctx context.Context, re return response, err } -// GetFleetResource Gets a FleetResource by identifier +// GetFleetResource Gets a Fleet Resource by identifier. // // # See also // @@ -1114,7 +1113,7 @@ func (client FleetAppsManagementClient) getWorkRequest(ctx context.Context, requ return response, err } -// ListAnnouncements Return a list of AnnouncementSummary items +// ListAnnouncements Return a list of AnnouncementSummary items. // // # See also // @@ -1172,7 +1171,7 @@ func (client FleetAppsManagementClient) listAnnouncements(ctx context.Context, r return response, err } -// ListFleetCredentials Returns a list of FleetCredentials. +// ListFleetCredentials List credentials in Fleet Application Management. // // # See also // @@ -1230,7 +1229,7 @@ func (client FleetAppsManagementClient) listFleetCredentials(ctx context.Context return response, err } -// ListFleetProducts Returns a list of FleetProducts. +// ListFleetProducts Returns a list of products associated with the confirmed targets. // // # See also // @@ -1288,7 +1287,7 @@ func (client FleetAppsManagementClient) listFleetProducts(ctx context.Context, r return response, err } -// ListFleetProperties Returns a list of FleetProperties. +// ListFleetProperties List fleet properties in Fleet Application Management. // // # See also // @@ -1346,7 +1345,7 @@ func (client FleetAppsManagementClient) listFleetProperties(ctx context.Context, return response, err } -// ListFleetResources Returns a list of FleetResources. +// ListFleetResources List resources for a fleet in Fleet Application Management. // // # See also // @@ -1404,7 +1403,7 @@ func (client FleetAppsManagementClient) listFleetResources(ctx context.Context, return response, err } -// ListFleetTargets Returns a list of FleetTargets. +// ListFleetTargets Returns the list of all confirmed targets within a fleet. // // # See also // @@ -1578,7 +1577,8 @@ func (client FleetAppsManagementClient) listInventoryResources(ctx context.Conte return response, err } -// ListTargets Returns a list of FleetTargets. +// ListTargets Return all targets belonging to the resources within a fleet. +// It will include both confirmed and unconfirmed targets. // // # See also // @@ -1810,7 +1810,7 @@ func (client FleetAppsManagementClient) listWorkRequests(ctx context.Context, re return response, err } -// RequestResourceValidation Request validation for resources with in a fleet +// RequestResourceValidation Request validation for resources within a fleet. // // # See also // @@ -1873,7 +1873,8 @@ func (client FleetAppsManagementClient) requestResourceValidation(ctx context.Co return response, err } -// RequestTargetDiscovery Confirm targets to be managed for a Fleet.Only targets that are confirmed will be managed by FAMS +// RequestTargetDiscovery Confirm targets to be managed for a Fleet. +// Only targets that are confirmed will be managed by Fleet Application Management // // # See also // @@ -1936,7 +1937,7 @@ func (client FleetAppsManagementClient) requestTargetDiscovery(ctx context.Conte return response, err } -// UpdateFleet Updates the Fleet +// UpdateFleet Update fleet information in Fleet Application Management. // // # See also // @@ -1994,7 +1995,7 @@ func (client FleetAppsManagementClient) updateFleet(ctx context.Context, request return response, err } -// UpdateFleetCredential Updates the FleetCredential +// UpdateFleetCredential Edit credentials associated with a product or application in Fleet Application Management. // // # See also // @@ -2052,7 +2053,7 @@ func (client FleetAppsManagementClient) updateFleetCredential(ctx context.Contex return response, err } -// UpdateFleetProperty Updates the FleetProperty +// UpdateFleetProperty Edit a property associated with a fleet in Fleet Application Management. // // # See also // @@ -2110,7 +2111,7 @@ func (client FleetAppsManagementClient) updateFleetProperty(ctx context.Context, return response, err } -// UpdateFleetResource Updates the FleetResource +// UpdateFleetResource Updates the FleetResource. // // # See also // diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go index 00d36429f28..2500e08f6dd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementadmin_client.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -92,7 +91,71 @@ func (client *FleetAppsManagementAdminClient) ConfigurationProvider() *common.Co return client.config } -// CreateOnboarding Onboard a tenant to Fleet Application Management Service +// CreateCompliancePolicyRule Creates a CompliancePolicyRule. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateCompliancePolicyRule.go.html to see an example of how to use CreateCompliancePolicyRule API. +// A default retry strategy applies to this operation CreateCompliancePolicyRule() +func (client FleetAppsManagementAdminClient) CreateCompliancePolicyRule(ctx context.Context, request CreateCompliancePolicyRuleRequest) (response CreateCompliancePolicyRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createCompliancePolicyRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateCompliancePolicyRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateCompliancePolicyRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateCompliancePolicyRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateCompliancePolicyRuleResponse") + } + return +} + +// createCompliancePolicyRule implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) createCompliancePolicyRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/compliancePolicyRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateCompliancePolicyRuleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/CompliancePolicyRule/CreateCompliancePolicyRule" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "CreateCompliancePolicyRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateOnboarding Onboard a tenant to Fleet Application Management. +// The onboarding process lets Fleet Application Management create a few required policies that you need to start using it and its features. // // # See also // @@ -155,7 +218,70 @@ func (client FleetAppsManagementAdminClient) createOnboarding(ctx context.Contex return response, err } -// CreateProperty Creates a new Property. +// CreatePlatformConfiguration Creates a new PlatformConfiguration. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreatePlatformConfiguration.go.html to see an example of how to use CreatePlatformConfiguration API. +// A default retry strategy applies to this operation CreatePlatformConfiguration() +func (client FleetAppsManagementAdminClient) CreatePlatformConfiguration(ctx context.Context, request CreatePlatformConfigurationRequest) (response CreatePlatformConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPlatformConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePlatformConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePlatformConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePlatformConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePlatformConfigurationResponse") + } + return +} + +// createPlatformConfiguration implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) createPlatformConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/platformConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePlatformConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PlatformConfiguration/CreatePlatformConfiguration" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "CreatePlatformConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateProperty Create a business-specific metadata property in Fleet Application Management and capture the business metadata classifications. // // # See also // @@ -218,13 +344,13 @@ func (client FleetAppsManagementAdminClient) createProperty(ctx context.Context, return response, err } -// DeleteProperty Deletes a Property resource by identifier +// DeleteCompliancePolicyRule Deletes a CompliancePolicyRule. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteProperty.go.html to see an example of how to use DeleteProperty API. -// A default retry strategy applies to this operation DeleteProperty() -func (client FleetAppsManagementAdminClient) DeleteProperty(ctx context.Context, request DeletePropertyRequest) (response DeletePropertyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteCompliancePolicyRule.go.html to see an example of how to use DeleteCompliancePolicyRule API. +// A default retry strategy applies to this operation DeleteCompliancePolicyRule() +func (client FleetAppsManagementAdminClient) DeleteCompliancePolicyRule(ctx context.Context, request DeleteCompliancePolicyRuleRequest) (response DeleteCompliancePolicyRuleResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -233,42 +359,42 @@ func (client FleetAppsManagementAdminClient) DeleteProperty(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.deleteProperty, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteCompliancePolicyRule, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = DeletePropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteCompliancePolicyRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = DeletePropertyResponse{} + response = DeleteCompliancePolicyRuleResponse{} } } return } - if convertedResponse, ok := ociResponse.(DeletePropertyResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteCompliancePolicyRuleResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into DeletePropertyResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteCompliancePolicyRuleResponse") } return } -// deleteProperty implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementAdminClient) deleteProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteCompliancePolicyRule implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) deleteCompliancePolicyRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodDelete, "/properties/{propertyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/compliancePolicyRules/{compliancePolicyRuleId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response DeletePropertyResponse + var response DeleteCompliancePolicyRuleResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Property/DeleteProperty" - err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "DeleteProperty", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/CompliancePolicyRule/DeleteCompliancePolicyRule" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "DeleteCompliancePolicyRule", apiReferenceLink) return response, err } @@ -276,13 +402,13 @@ func (client FleetAppsManagementAdminClient) deleteProperty(ctx context.Context, return response, err } -// GetProperty Gets a Property by identifier +// DeleteOnboarding Deletes Fleet Application Management onboarding resource by identifier // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetProperty.go.html to see an example of how to use GetProperty API. -// A default retry strategy applies to this operation GetProperty() -func (client FleetAppsManagementAdminClient) GetProperty(ctx context.Context, request GetPropertyRequest) (response GetPropertyResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteOnboarding.go.html to see an example of how to use DeleteOnboarding API. +// A default retry strategy applies to this operation DeleteOnboarding() +func (client FleetAppsManagementAdminClient) DeleteOnboarding(ctx context.Context, request DeleteOnboardingRequest) (response DeleteOnboardingResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -291,42 +417,42 @@ func (client FleetAppsManagementAdminClient) GetProperty(ctx context.Context, re if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.getProperty, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteOnboarding, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = GetPropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeleteOnboardingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = GetPropertyResponse{} + response = DeleteOnboardingResponse{} } } return } - if convertedResponse, ok := ociResponse.(GetPropertyResponse); ok { + if convertedResponse, ok := ociResponse.(DeleteOnboardingResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into GetPropertyResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeleteOnboardingResponse") } return } -// getProperty implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementAdminClient) getProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteOnboarding implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) deleteOnboarding(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/properties/{propertyId}", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/Onboardings/{onboardingId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response GetPropertyResponse + var response DeleteOnboardingResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Property/GetProperty" - err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "GetProperty", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Onboarding/DeleteOnboarding" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "DeleteOnboarding", apiReferenceLink) return response, err } @@ -334,13 +460,13 @@ func (client FleetAppsManagementAdminClient) getProperty(ctx context.Context, re return response, err } -// ListOnboardingPolicies Returns a list of onboarding policy information for FAMS. +// DeletePlatformConfiguration Deletes a PlatformConfiguration resource by identifier // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardingPolicies.go.html to see an example of how to use ListOnboardingPolicies API. -// A default retry strategy applies to this operation ListOnboardingPolicies() -func (client FleetAppsManagementAdminClient) ListOnboardingPolicies(ctx context.Context, request ListOnboardingPoliciesRequest) (response ListOnboardingPoliciesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeletePlatformConfiguration.go.html to see an example of how to use DeletePlatformConfiguration API. +// A default retry strategy applies to this operation DeletePlatformConfiguration() +func (client FleetAppsManagementAdminClient) DeletePlatformConfiguration(ctx context.Context, request DeletePlatformConfigurationRequest) (response DeletePlatformConfigurationResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -349,42 +475,42 @@ func (client FleetAppsManagementAdminClient) ListOnboardingPolicies(ctx context. if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOnboardingPolicies, policy) + ociResponse, err = common.Retry(ctx, request, client.deletePlatformConfiguration, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListOnboardingPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeletePlatformConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOnboardingPoliciesResponse{} + response = DeletePlatformConfigurationResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOnboardingPoliciesResponse); ok { + if convertedResponse, ok := ociResponse.(DeletePlatformConfigurationResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOnboardingPoliciesResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeletePlatformConfigurationResponse") } return } -// listOnboardingPolicies implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementAdminClient) listOnboardingPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deletePlatformConfiguration implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) deletePlatformConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/OnboardingPolicies", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/platformConfigurations/{platformConfigurationId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOnboardingPoliciesResponse + var response DeletePlatformConfigurationResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/OnboardingPolicyCollection/ListOnboardingPolicies" - err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListOnboardingPolicies", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PlatformConfiguration/DeletePlatformConfiguration" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "DeletePlatformConfiguration", apiReferenceLink) return response, err } @@ -392,13 +518,13 @@ func (client FleetAppsManagementAdminClient) listOnboardingPolicies(ctx context. return response, err } -// ListOnboardings Returns a list of onboarding information for the Tenancy. +// DeleteProperty Delete a property in Fleet Application Management. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardings.go.html to see an example of how to use ListOnboardings API. -// A default retry strategy applies to this operation ListOnboardings() -func (client FleetAppsManagementAdminClient) ListOnboardings(ctx context.Context, request ListOnboardingsRequest) (response ListOnboardingsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteProperty.go.html to see an example of how to use DeleteProperty API. +// A default retry strategy applies to this operation DeleteProperty() +func (client FleetAppsManagementAdminClient) DeleteProperty(ctx context.Context, request DeletePropertyRequest) (response DeletePropertyResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -407,42 +533,42 @@ func (client FleetAppsManagementAdminClient) ListOnboardings(ctx context.Context if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listOnboardings, policy) + ociResponse, err = common.Retry(ctx, request, client.deleteProperty, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListOnboardingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = DeletePropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListOnboardingsResponse{} + response = DeletePropertyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListOnboardingsResponse); ok { + if convertedResponse, ok := ociResponse.(DeletePropertyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListOnboardingsResponse") + err = fmt.Errorf("failed to convert OCIResponse into DeletePropertyResponse") } return } -// listOnboardings implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementAdminClient) listOnboardings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// deleteProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) deleteProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/Onboardings", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/properties/{propertyId}", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListOnboardingsResponse + var response DeletePropertyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/OnboardingCollection/ListOnboardings" - err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListOnboardings", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Property/DeleteProperty" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "DeleteProperty", apiReferenceLink) return response, err } @@ -450,13 +576,13 @@ func (client FleetAppsManagementAdminClient) listOnboardings(ctx context.Context return response, err } -// ListProperties Returns a list of Properties for Tenancy. +// EnableLatestPolicy Enable Policies for a newer version of Fleet Application Management // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListProperties.go.html to see an example of how to use ListProperties API. -// A default retry strategy applies to this operation ListProperties() -func (client FleetAppsManagementAdminClient) ListProperties(ctx context.Context, request ListPropertiesRequest) (response ListPropertiesResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/EnableLatestPolicy.go.html to see an example of how to use EnableLatestPolicy API. +// A default retry strategy applies to this operation EnableLatestPolicy() +func (client FleetAppsManagementAdminClient) EnableLatestPolicy(ctx context.Context, request EnableLatestPolicyRequest) (response EnableLatestPolicyResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -465,42 +591,922 @@ func (client FleetAppsManagementAdminClient) ListProperties(ctx context.Context, if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listProperties, policy) + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.enableLatestPolicy, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListPropertiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = EnableLatestPolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListPropertiesResponse{} + response = EnableLatestPolicyResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListPropertiesResponse); ok { + if convertedResponse, ok := ociResponse.(EnableLatestPolicyResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListPropertiesResponse") + err = fmt.Errorf("failed to convert OCIResponse into EnableLatestPolicyResponse") } return } -// listProperties implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementAdminClient) listProperties(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// enableLatestPolicy implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) enableLatestPolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/properties", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodPost, "/Onboardings/{onboardingId}/actions/enableLatestPolicy", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListPropertiesResponse + var response EnableLatestPolicyResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PropertyCollection/ListProperties" - err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListProperties", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Onboarding/EnableLatestPolicy" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "EnableLatestPolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCompliancePolicy Gets information about a CompliancePolicy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetCompliancePolicy.go.html to see an example of how to use GetCompliancePolicy API. +// A default retry strategy applies to this operation GetCompliancePolicy() +func (client FleetAppsManagementAdminClient) GetCompliancePolicy(ctx context.Context, request GetCompliancePolicyRequest) (response GetCompliancePolicyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCompliancePolicy, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCompliancePolicyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCompliancePolicyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCompliancePolicyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCompliancePolicyResponse") + } + return +} + +// getCompliancePolicy implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) getCompliancePolicy(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/compliancePolicies/{compliancePolicyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCompliancePolicyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/CompliancePolicy/GetCompliancePolicy" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "GetCompliancePolicy", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetCompliancePolicyRule Gets information about a CompliancePolicyRule. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetCompliancePolicyRule.go.html to see an example of how to use GetCompliancePolicyRule API. +// A default retry strategy applies to this operation GetCompliancePolicyRule() +func (client FleetAppsManagementAdminClient) GetCompliancePolicyRule(ctx context.Context, request GetCompliancePolicyRuleRequest) (response GetCompliancePolicyRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getCompliancePolicyRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetCompliancePolicyRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetCompliancePolicyRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetCompliancePolicyRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetCompliancePolicyRuleResponse") + } + return +} + +// getCompliancePolicyRule implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) getCompliancePolicyRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/compliancePolicyRules/{compliancePolicyRuleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetCompliancePolicyRuleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/CompliancePolicyRule/GetCompliancePolicyRule" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "GetCompliancePolicyRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetOnboarding Gets a Fleet Application Management Onboarding by identifier. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetOnboarding.go.html to see an example of how to use GetOnboarding API. +// A default retry strategy applies to this operation GetOnboarding() +func (client FleetAppsManagementAdminClient) GetOnboarding(ctx context.Context, request GetOnboardingRequest) (response GetOnboardingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getOnboarding, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetOnboardingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetOnboardingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetOnboardingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetOnboardingResponse") + } + return +} + +// getOnboarding implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) getOnboarding(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/Onboardings/{onboardingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetOnboardingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Onboarding/GetOnboarding" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "GetOnboarding", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetPlatformConfiguration Gets a PlatformConfiguration by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetPlatformConfiguration.go.html to see an example of how to use GetPlatformConfiguration API. +// A default retry strategy applies to this operation GetPlatformConfiguration() +func (client FleetAppsManagementAdminClient) GetPlatformConfiguration(ctx context.Context, request GetPlatformConfigurationRequest) (response GetPlatformConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPlatformConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPlatformConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPlatformConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPlatformConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPlatformConfigurationResponse") + } + return +} + +// getPlatformConfiguration implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) getPlatformConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/platformConfigurations/{platformConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPlatformConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PlatformConfiguration/GetPlatformConfiguration" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "GetPlatformConfiguration", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetProperty Gets a Property by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetProperty.go.html to see an example of how to use GetProperty API. +// A default retry strategy applies to this operation GetProperty() +func (client FleetAppsManagementAdminClient) GetProperty(ctx context.Context, request GetPropertyRequest) (response GetPropertyResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getProperty, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPropertyResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPropertyResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPropertyResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPropertyResponse") + } + return +} + +// getProperty implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) getProperty(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/properties/{propertyId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPropertyResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Property/GetProperty" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "GetProperty", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCompliancePolicies Gets a list of compliancePolicies. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListCompliancePolicies.go.html to see an example of how to use ListCompliancePolicies API. +// A default retry strategy applies to this operation ListCompliancePolicies() +func (client FleetAppsManagementAdminClient) ListCompliancePolicies(ctx context.Context, request ListCompliancePoliciesRequest) (response ListCompliancePoliciesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCompliancePolicies, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCompliancePoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCompliancePoliciesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCompliancePoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCompliancePoliciesResponse") + } + return +} + +// listCompliancePolicies implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listCompliancePolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/compliancePolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListCompliancePoliciesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/CompliancePolicyCollection/ListCompliancePolicies" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListCompliancePolicies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListCompliancePolicyRules Gets a list of CompliancePolicyRules. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListCompliancePolicyRules.go.html to see an example of how to use ListCompliancePolicyRules API. +// A default retry strategy applies to this operation ListCompliancePolicyRules() +func (client FleetAppsManagementAdminClient) ListCompliancePolicyRules(ctx context.Context, request ListCompliancePolicyRulesRequest) (response ListCompliancePolicyRulesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listCompliancePolicyRules, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListCompliancePolicyRulesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListCompliancePolicyRulesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListCompliancePolicyRulesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListCompliancePolicyRulesResponse") + } + return +} + +// listCompliancePolicyRules implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listCompliancePolicyRules(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/compliancePolicyRules", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListCompliancePolicyRulesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/CompliancePolicyRuleCollection/ListCompliancePolicyRules" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListCompliancePolicyRules", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListOnboardingPolicies Returns a list of onboarding policy information for Fleet Application Management. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardingPolicies.go.html to see an example of how to use ListOnboardingPolicies API. +// A default retry strategy applies to this operation ListOnboardingPolicies() +func (client FleetAppsManagementAdminClient) ListOnboardingPolicies(ctx context.Context, request ListOnboardingPoliciesRequest) (response ListOnboardingPoliciesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listOnboardingPolicies, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListOnboardingPoliciesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListOnboardingPoliciesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListOnboardingPoliciesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListOnboardingPoliciesResponse") + } + return +} + +// listOnboardingPolicies implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listOnboardingPolicies(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/OnboardingPolicies", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListOnboardingPoliciesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/OnboardingPolicyCollection/ListOnboardingPolicies" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListOnboardingPolicies", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListOnboardings Returns a list of onboarding information for the Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListOnboardings.go.html to see an example of how to use ListOnboardings API. +// A default retry strategy applies to this operation ListOnboardings() +func (client FleetAppsManagementAdminClient) ListOnboardings(ctx context.Context, request ListOnboardingsRequest) (response ListOnboardingsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listOnboardings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListOnboardingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListOnboardingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListOnboardingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListOnboardingsResponse") + } + return +} + +// listOnboardings implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listOnboardings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/Onboardings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListOnboardingsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/OnboardingCollection/ListOnboardings" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListOnboardings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListPlatformConfigurations Returns a list of PlatformConfiguration for Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListPlatformConfigurations.go.html to see an example of how to use ListPlatformConfigurations API. +// A default retry strategy applies to this operation ListPlatformConfigurations() +func (client FleetAppsManagementAdminClient) ListPlatformConfigurations(ctx context.Context, request ListPlatformConfigurationsRequest) (response ListPlatformConfigurationsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listPlatformConfigurations, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPlatformConfigurationsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPlatformConfigurationsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPlatformConfigurationsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPlatformConfigurationsResponse") + } + return +} + +// listPlatformConfigurations implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listPlatformConfigurations(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/platformConfigurations", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListPlatformConfigurationsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PlatformConfigurationCollection/ListPlatformConfigurations" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListPlatformConfigurations", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListProperties List properties and their values for a tenancy in Fleet Application Management. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListProperties.go.html to see an example of how to use ListProperties API. +// A default retry strategy applies to this operation ListProperties() +func (client FleetAppsManagementAdminClient) ListProperties(ctx context.Context, request ListPropertiesRequest) (response ListPropertiesResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listProperties, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListPropertiesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListPropertiesResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListPropertiesResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListPropertiesResponse") + } + return +} + +// listProperties implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) listProperties(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/properties", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListPropertiesResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PropertyCollection/ListProperties" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ListProperties", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ManageSettings Updates the Onboarding setting +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ManageSettings.go.html to see an example of how to use ManageSettings API. +// A default retry strategy applies to this operation ManageSettings() +func (client FleetAppsManagementAdminClient) ManageSettings(ctx context.Context, request ManageSettingsRequest) (response ManageSettingsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.manageSettings, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ManageSettingsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ManageSettingsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ManageSettingsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ManageSettingsResponse") + } + return +} + +// manageSettings implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) manageSettings(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/Onboardings/{onboardingId}/actions/manageSettings", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ManageSettingsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Onboarding/ManageSettings" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "ManageSettings", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateCompliancePolicyRule Updates a CompliancePolicyRule. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateCompliancePolicyRule.go.html to see an example of how to use UpdateCompliancePolicyRule API. +// A default retry strategy applies to this operation UpdateCompliancePolicyRule() +func (client FleetAppsManagementAdminClient) UpdateCompliancePolicyRule(ctx context.Context, request UpdateCompliancePolicyRuleRequest) (response UpdateCompliancePolicyRuleResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateCompliancePolicyRule, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateCompliancePolicyRuleResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateCompliancePolicyRuleResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateCompliancePolicyRuleResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateCompliancePolicyRuleResponse") + } + return +} + +// updateCompliancePolicyRule implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) updateCompliancePolicyRule(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/compliancePolicyRules/{compliancePolicyRuleId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateCompliancePolicyRuleResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/CompliancePolicyRule/UpdateCompliancePolicyRule" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "UpdateCompliancePolicyRule", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateOnboarding Updates the Onboarding +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateOnboarding.go.html to see an example of how to use UpdateOnboarding API. +// A default retry strategy applies to this operation UpdateOnboarding() +func (client FleetAppsManagementAdminClient) UpdateOnboarding(ctx context.Context, request UpdateOnboardingRequest) (response UpdateOnboardingResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateOnboarding, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateOnboardingResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateOnboardingResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateOnboardingResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateOnboardingResponse") + } + return +} + +// updateOnboarding implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) updateOnboarding(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/Onboardings/{onboardingId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateOnboardingResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Onboarding/UpdateOnboarding" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "UpdateOnboarding", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePlatformConfiguration Updates the PlatformConfiguration +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdatePlatformConfiguration.go.html to see an example of how to use UpdatePlatformConfiguration API. +// A default retry strategy applies to this operation UpdatePlatformConfiguration() +func (client FleetAppsManagementAdminClient) UpdatePlatformConfiguration(ctx context.Context, request UpdatePlatformConfigurationRequest) (response UpdatePlatformConfigurationResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePlatformConfiguration, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePlatformConfigurationResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePlatformConfigurationResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePlatformConfigurationResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePlatformConfigurationResponse") + } + return +} + +// updatePlatformConfiguration implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementAdminClient) updatePlatformConfiguration(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/platformConfigurations/{platformConfigurationId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdatePlatformConfigurationResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PlatformConfiguration/UpdatePlatformConfiguration" + err = common.PostProcessServiceError(err, "FleetAppsManagementAdmin", "UpdatePlatformConfiguration", apiReferenceLink) return response, err } @@ -508,7 +1514,7 @@ func (client FleetAppsManagementAdminClient) listProperties(ctx context.Context, return response, err } -// UpdateProperty Updates the Property +// UpdateProperty Update a property in Fleet Application Management. // // # See also // diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go index 2407f137ac7..725122e1ff7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementmaintenancewindow_client.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -92,7 +91,7 @@ func (client *FleetAppsManagementMaintenanceWindowClient) ConfigurationProvider( return client.config } -// CreateMaintenanceWindow Creates a new MaintenanceWindow. +// CreateMaintenanceWindow Create a maintenance window in Fleet Application Management. // // # See also // @@ -155,7 +154,7 @@ func (client FleetAppsManagementMaintenanceWindowClient) createMaintenanceWindow return response, err } -// DeleteMaintenanceWindow Deletes a MaintenanceWindow resource by identifier +// DeleteMaintenanceWindow Delete a maintenance window in Fleet Application Management. // // # See also // @@ -213,7 +212,7 @@ func (client FleetAppsManagementMaintenanceWindowClient) deleteMaintenanceWindow return response, err } -// GetMaintenanceWindow Gets a MaintenanceWindow by identifier +// GetMaintenanceWindow Get the details for a maintenance window in Fleet Application Management. // // # See also // @@ -271,7 +270,7 @@ func (client FleetAppsManagementMaintenanceWindowClient) getMaintenanceWindow(ct return response, err } -// ListMaintenanceWindows Returns a list of MaintenanceWindows in the specified Tenancy. +// ListMaintenanceWindows List maintenance windows for a specified tenancy in Fleet Application Management. // // # See also // @@ -329,7 +328,7 @@ func (client FleetAppsManagementMaintenanceWindowClient) listMaintenanceWindows( return response, err } -// UpdateMaintenanceWindow Updates the MaintenanceWindow +// UpdateMaintenanceWindow Update a maintenance window in Fleet Application Management. // // # See also // diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go index e215956a36e..95c2a17764a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementoperations_client.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -92,7 +91,70 @@ func (client *FleetAppsManagementOperationsClient) ConfigurationProvider() *comm return client.config } -// CreateSchedulerDefinition Creates a new SchedulerDefinition. +// CreatePatch Creates a new Patch. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreatePatch.go.html to see an example of how to use CreatePatch API. +// A default retry strategy applies to this operation CreatePatch() +func (client FleetAppsManagementOperationsClient) CreatePatch(ctx context.Context, request CreatePatchRequest) (response CreatePatchResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createPatch, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreatePatchResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreatePatchResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreatePatchResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreatePatchResponse") + } + return +} + +// createPatch implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) createPatch(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/patches", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreatePatchResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Patch/CreatePatch" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "CreatePatch", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateSchedulerDefinition Create a SchedulerDefinition to perform lifecycle operations. // // # See also // @@ -155,6 +217,64 @@ func (client FleetAppsManagementOperationsClient) createSchedulerDefinition(ctx return response, err } +// DeletePatch Deletes a Patch resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeletePatch.go.html to see an example of how to use DeletePatch API. +// A default retry strategy applies to this operation DeletePatch() +func (client FleetAppsManagementOperationsClient) DeletePatch(ctx context.Context, request DeletePatchRequest) (response DeletePatchResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deletePatch, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeletePatchResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeletePatchResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeletePatchResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeletePatchResponse") + } + return +} + +// deletePatch implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) deletePatch(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/patches/{patchId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeletePatchResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Patch/DeletePatch" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "DeletePatch", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // DeleteSchedulerDefinition Deletes a SchedulerDefinition resource by identifier // // # See also @@ -213,7 +333,7 @@ func (client FleetAppsManagementOperationsClient) deleteSchedulerDefinition(ctx return response, err } -// DeleteSchedulerJob Deletes a SchedulerJob resource by identifier +// DeleteSchedulerJob Delete a lifecycle operation schedule in Fleet Application Management. // // # See also // @@ -271,7 +391,69 @@ func (client FleetAppsManagementOperationsClient) deleteSchedulerJob(ctx context return response, err } -// GetExecution Gets a JobActivity by identifier +// ExportComplianceReport Generate Compliance Report +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ExportComplianceReport.go.html to see an example of how to use ExportComplianceReport API. +// A default retry strategy applies to this operation ExportComplianceReport() +func (client FleetAppsManagementOperationsClient) ExportComplianceReport(ctx context.Context, request ExportComplianceReportRequest) (response ExportComplianceReportResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.exportComplianceReport, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ExportComplianceReportResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ExportComplianceReportResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ExportComplianceReportResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ExportComplianceReportResponse") + } + return +} + +// exportComplianceReport implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) exportComplianceReport(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/complianceRecords/actions/exportComplianceReport", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ExportComplianceReportResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ComplianceRecord/ExportComplianceReport" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ExportComplianceReport", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetExecution Get Task Execution by Identifier for a Resource within an action group. // // # See also // @@ -329,7 +511,7 @@ func (client FleetAppsManagementOperationsClient) getExecution(ctx context.Conte return response, err } -// GetJobActivity Gets a JobActivity by identifier +// GetJobActivity Gets activity details by identifier for a job. // // # See also // @@ -387,7 +569,65 @@ func (client FleetAppsManagementOperationsClient) getJobActivity(ctx context.Con return response, err } -// GetSchedulerDefinition Gets a SchedulerDefinition by identifier +// GetPatch Gets a Patch by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetPatch.go.html to see an example of how to use GetPatch API. +// A default retry strategy applies to this operation GetPatch() +func (client FleetAppsManagementOperationsClient) GetPatch(ctx context.Context, request GetPatchRequest) (response GetPatchResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.getPatch, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = GetPatchResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = GetPatchResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(GetPatchResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into GetPatchResponse") + } + return +} + +// getPatch implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) getPatch(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/patches/{patchId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response GetPatchResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Patch/GetPatch" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "GetPatch", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetSchedulerDefinition Get the details of a SchedulerDefinition that performs lifecycle management operations. // // # See also // @@ -445,7 +685,7 @@ func (client FleetAppsManagementOperationsClient) getSchedulerDefinition(ctx con return response, err } -// GetSchedulerJob Gets a SchedulerJob by identifier +// GetSchedulerJob Get the details of a lifecycle management operations job in Fleet Application Management. // // # See also // @@ -503,13 +743,13 @@ func (client FleetAppsManagementOperationsClient) getSchedulerJob(ctx context.Co return response, err } -// ListExecutions Returns a list of Task Executions for a Resource. +// ListComplianceRecords Gets a list of complianceDetails. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListExecutions.go.html to see an example of how to use ListExecutions API. -// A default retry strategy applies to this operation ListExecutions() -func (client FleetAppsManagementOperationsClient) ListExecutions(ctx context.Context, request ListExecutionsRequest) (response ListExecutionsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListComplianceRecords.go.html to see an example of how to use ListComplianceRecords API. +// A default retry strategy applies to this operation ListComplianceRecords() +func (client FleetAppsManagementOperationsClient) ListComplianceRecords(ctx context.Context, request ListComplianceRecordsRequest) (response ListComplianceRecordsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -518,42 +758,42 @@ func (client FleetAppsManagementOperationsClient) ListExecutions(ctx context.Con if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listExecutions, policy) + ociResponse, err = common.Retry(ctx, request, client.listComplianceRecords, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListExecutionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListComplianceRecordsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListExecutionsResponse{} + response = ListComplianceRecordsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListExecutionsResponse); ok { + if convertedResponse, ok := ociResponse.(ListComplianceRecordsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListExecutionsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListComplianceRecordsResponse") } return } -// listExecutions implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementOperationsClient) listExecutions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listComplianceRecords implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listComplianceRecords(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}/jobActivities/{jobActivityId}/resources/{resourceId}/executions", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/complianceRecords", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListExecutionsResponse + var response ListComplianceRecordsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ExecutionCollection/ListExecutions" - err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListExecutions", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ComplianceRecordCollection/ListComplianceRecords" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListComplianceRecords", apiReferenceLink) return response, err } @@ -561,13 +801,13 @@ func (client FleetAppsManagementOperationsClient) listExecutions(ctx context.Con return response, err } -// ListScheduledFleets Returns a list of ScheduledFleets +// ListExecutions Returns a list of Task Executions for a Resource. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListScheduledFleets.go.html to see an example of how to use ListScheduledFleets API. -// A default retry strategy applies to this operation ListScheduledFleets() -func (client FleetAppsManagementOperationsClient) ListScheduledFleets(ctx context.Context, request ListScheduledFleetsRequest) (response ListScheduledFleetsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListExecutions.go.html to see an example of how to use ListExecutions API. +// A default retry strategy applies to this operation ListExecutions() +func (client FleetAppsManagementOperationsClient) ListExecutions(ctx context.Context, request ListExecutionsRequest) (response ListExecutionsResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -576,42 +816,42 @@ func (client FleetAppsManagementOperationsClient) ListScheduledFleets(ctx contex if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listScheduledFleets, policy) + ociResponse, err = common.Retry(ctx, request, client.listExecutions, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListScheduledFleetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListExecutionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListScheduledFleetsResponse{} + response = ListExecutionsResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListScheduledFleetsResponse); ok { + if convertedResponse, ok := ociResponse.(ListExecutionsResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListScheduledFleetsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListExecutionsResponse") } return } -// listScheduledFleets implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementOperationsClient) listScheduledFleets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listExecutions implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listExecutions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerDefinitions/{schedulerDefinitionId}/scheduledFleets", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}/jobActivities/{jobActivityId}/resources/{resourceId}/executions", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListScheduledFleetsResponse + var response ListExecutionsResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ScheduledFleetCollection/ListScheduledFleets" - err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListScheduledFleets", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ExecutionCollection/ListExecutions" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListExecutions", apiReferenceLink) return response, err } @@ -619,13 +859,13 @@ func (client FleetAppsManagementOperationsClient) listScheduledFleets(ctx contex return response, err } -// ListSchedulerDefinitions Returns a list of SchedulerDefinitions. +// ListPatches Returns a list of Patches. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerDefinitions.go.html to see an example of how to use ListSchedulerDefinitions API. -// A default retry strategy applies to this operation ListSchedulerDefinitions() -func (client FleetAppsManagementOperationsClient) ListSchedulerDefinitions(ctx context.Context, request ListSchedulerDefinitionsRequest) (response ListSchedulerDefinitionsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListPatches.go.html to see an example of how to use ListPatches API. +// A default retry strategy applies to this operation ListPatches() +func (client FleetAppsManagementOperationsClient) ListPatches(ctx context.Context, request ListPatchesRequest) (response ListPatchesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -634,42 +874,42 @@ func (client FleetAppsManagementOperationsClient) ListSchedulerDefinitions(ctx c if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listSchedulerDefinitions, policy) + ociResponse, err = common.Retry(ctx, request, client.listPatches, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSchedulerDefinitionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListPatchesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSchedulerDefinitionsResponse{} + response = ListPatchesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSchedulerDefinitionsResponse); ok { + if convertedResponse, ok := ociResponse.(ListPatchesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSchedulerDefinitionsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListPatchesResponse") } return } -// listSchedulerDefinitions implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementOperationsClient) listSchedulerDefinitions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listPatches implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listPatches(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerDefinitions", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/patches", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSchedulerDefinitionsResponse + var response ListPatchesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/SchedulerDefinitionCollection/ListSchedulerDefinitions" - err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListSchedulerDefinitions", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/PatchCollection/ListPatches" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListPatches", apiReferenceLink) return response, err } @@ -677,13 +917,13 @@ func (client FleetAppsManagementOperationsClient) listSchedulerDefinitions(ctx c return response, err } -// ListSchedulerJobs Returns a list of SchedulerJobs. +// ListResources Returns a list of resources for an Activity Execution. // // # See also // -// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerJobs.go.html to see an example of how to use ListSchedulerJobs API. -// A default retry strategy applies to this operation ListSchedulerJobs() -func (client FleetAppsManagementOperationsClient) ListSchedulerJobs(ctx context.Context, request ListSchedulerJobsRequest) (response ListSchedulerJobsResponse, err error) { +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListResources.go.html to see an example of how to use ListResources API. +// A default retry strategy applies to this operation ListResources() +func (client FleetAppsManagementOperationsClient) ListResources(ctx context.Context, request ListResourcesRequest) (response ListResourcesResponse, err error) { var ociResponse common.OCIResponse policy := common.DefaultRetryPolicy() if client.RetryPolicy() != nil { @@ -692,42 +932,569 @@ func (client FleetAppsManagementOperationsClient) ListSchedulerJobs(ctx context. if request.RetryPolicy() != nil { policy = *request.RetryPolicy() } - ociResponse, err = common.Retry(ctx, request, client.listSchedulerJobs, policy) + ociResponse, err = common.Retry(ctx, request, client.listResources, policy) if err != nil { if ociResponse != nil { if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { opcRequestId := httpResponse.Header.Get("opc-request-id") - response = ListSchedulerJobsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + response = ListResourcesResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} } else { - response = ListSchedulerJobsResponse{} + response = ListResourcesResponse{} } } return } - if convertedResponse, ok := ociResponse.(ListSchedulerJobsResponse); ok { + if convertedResponse, ok := ociResponse.(ListResourcesResponse); ok { response = convertedResponse } else { - err = fmt.Errorf("failed to convert OCIResponse into ListSchedulerJobsResponse") + err = fmt.Errorf("failed to convert OCIResponse into ListResourcesResponse") } return } -// listSchedulerJobs implements the OCIOperation interface (enables retrying operations) -func (client FleetAppsManagementOperationsClient) listSchedulerJobs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { +// listResources implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listResources(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { - httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs", binaryReqBody, extraHeaders) + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}/jobActivities/{jobActivityId}/resources", binaryReqBody, extraHeaders) if err != nil { return nil, err } - var response ListSchedulerJobsResponse + var response ListResourcesResponse var httpResponse *http.Response httpResponse, err = client.Call(ctx, &httpRequest) defer common.CloseBodyIfValid(httpResponse) response.RawResponse = httpResponse if err != nil { - apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/SchedulerJobCollection/ListSchedulerJobs" - err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListSchedulerJobs", apiReferenceLink) + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ResourceCollection/ListResources" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListResources", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListScheduledFleets Returns a list of ScheduledFleets. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListScheduledFleets.go.html to see an example of how to use ListScheduledFleets API. +// A default retry strategy applies to this operation ListScheduledFleets() +func (client FleetAppsManagementOperationsClient) ListScheduledFleets(ctx context.Context, request ListScheduledFleetsRequest) (response ListScheduledFleetsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listScheduledFleets, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListScheduledFleetsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListScheduledFleetsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListScheduledFleetsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListScheduledFleetsResponse") + } + return +} + +// listScheduledFleets implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listScheduledFleets(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerDefinitions/{schedulerDefinitionId}/scheduledFleets", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListScheduledFleetsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ScheduledFleetCollection/ListScheduledFleets" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListScheduledFleets", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSchedulerDefinitions List all lifecycle management schedules in Fleet Application Management. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerDefinitions.go.html to see an example of how to use ListSchedulerDefinitions API. +// A default retry strategy applies to this operation ListSchedulerDefinitions() +func (client FleetAppsManagementOperationsClient) ListSchedulerDefinitions(ctx context.Context, request ListSchedulerDefinitionsRequest) (response ListSchedulerDefinitionsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSchedulerDefinitions, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSchedulerDefinitionsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSchedulerDefinitionsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSchedulerDefinitionsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSchedulerDefinitionsResponse") + } + return +} + +// listSchedulerDefinitions implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listSchedulerDefinitions(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerDefinitions", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSchedulerDefinitionsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/SchedulerDefinitionCollection/ListSchedulerDefinitions" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListSchedulerDefinitions", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSchedulerJobs List scheduled lifecycle operation jobs in Fleet Application Management. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSchedulerJobs.go.html to see an example of how to use ListSchedulerJobs API. +// A default retry strategy applies to this operation ListSchedulerJobs() +func (client FleetAppsManagementOperationsClient) ListSchedulerJobs(ctx context.Context, request ListSchedulerJobsRequest) (response ListSchedulerJobsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSchedulerJobs, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListSchedulerJobsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListSchedulerJobsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListSchedulerJobsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListSchedulerJobsResponse") + } + return +} + +// listSchedulerJobs implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listSchedulerJobs(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListSchedulerJobsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/SchedulerJobCollection/ListSchedulerJobs" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListSchedulerJobs", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ListSteps Returns a list of Steps for an Activity Execution. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSteps.go.html to see an example of how to use ListSteps API. +// A default retry strategy applies to this operation ListSteps() +func (client FleetAppsManagementOperationsClient) ListSteps(ctx context.Context, request ListStepsRequest) (response ListStepsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.listSteps, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ListStepsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ListStepsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ListStepsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ListStepsResponse") + } + return +} + +// listSteps implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) listSteps(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobs/{schedulerJobId}/jobActivities/{jobActivityId}/steps", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ListStepsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/StepCollection/ListSteps" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ListSteps", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// ManageJobExecution Manage execution actions for a Job like retrying or pausing a task. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ManageJobExecution.go.html to see an example of how to use ManageJobExecution API. +// A default retry strategy applies to this operation ManageJobExecution() +func (client FleetAppsManagementOperationsClient) ManageJobExecution(ctx context.Context, request ManageJobExecutionRequest) (response ManageJobExecutionResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.manageJobExecution, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = ManageJobExecutionResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = ManageJobExecutionResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(ManageJobExecutionResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into ManageJobExecutionResponse") + } + return +} + +// manageJobExecution implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) manageJobExecution(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/schedulerJobs/{schedulerJobId}/actions/manageJobExecution", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response ManageJobExecutionResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/SchedulerJob/ManageJobExecution" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "ManageJobExecution", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SummarizeComplianceRecordCounts Retrieve aggregated summary information of ComplianceRecords within a Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SummarizeComplianceRecordCounts.go.html to see an example of how to use SummarizeComplianceRecordCounts API. +// A default retry strategy applies to this operation SummarizeComplianceRecordCounts() +func (client FleetAppsManagementOperationsClient) SummarizeComplianceRecordCounts(ctx context.Context, request SummarizeComplianceRecordCountsRequest) (response SummarizeComplianceRecordCountsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.summarizeComplianceRecordCounts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SummarizeComplianceRecordCountsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SummarizeComplianceRecordCountsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SummarizeComplianceRecordCountsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SummarizeComplianceRecordCountsResponse") + } + return +} + +// summarizeComplianceRecordCounts implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) summarizeComplianceRecordCounts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/complianceRecordCounts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response SummarizeComplianceRecordCountsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ComplianceRecordAggregationCollection/SummarizeComplianceRecordCounts" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "SummarizeComplianceRecordCounts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SummarizeManagedEntityCounts Retrieve aggregated summary information of Managed Entities within a Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SummarizeManagedEntityCounts.go.html to see an example of how to use SummarizeManagedEntityCounts API. +// A default retry strategy applies to this operation SummarizeManagedEntityCounts() +func (client FleetAppsManagementOperationsClient) SummarizeManagedEntityCounts(ctx context.Context, request SummarizeManagedEntityCountsRequest) (response SummarizeManagedEntityCountsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.summarizeManagedEntityCounts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SummarizeManagedEntityCountsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SummarizeManagedEntityCountsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SummarizeManagedEntityCountsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SummarizeManagedEntityCountsResponse") + } + return +} + +// summarizeManagedEntityCounts implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) summarizeManagedEntityCounts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/managedEntityCounts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response SummarizeManagedEntityCountsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/ManagedEntityAggregationCollection/SummarizeManagedEntityCounts" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "SummarizeManagedEntityCounts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SummarizeSchedulerJobCounts Retrieve aggregated summary information of Scheduler Jobs within a Tenancy. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SummarizeSchedulerJobCounts.go.html to see an example of how to use SummarizeSchedulerJobCounts API. +// A default retry strategy applies to this operation SummarizeSchedulerJobCounts() +func (client FleetAppsManagementOperationsClient) SummarizeSchedulerJobCounts(ctx context.Context, request SummarizeSchedulerJobCountsRequest) (response SummarizeSchedulerJobCountsResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.summarizeSchedulerJobCounts, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SummarizeSchedulerJobCountsResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SummarizeSchedulerJobCountsResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SummarizeSchedulerJobCountsResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SummarizeSchedulerJobCountsResponse") + } + return +} + +// summarizeSchedulerJobCounts implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) summarizeSchedulerJobCounts(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/schedulerJobCounts", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response SummarizeSchedulerJobCountsResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/SchedulerJobAggregationCollection/SummarizeSchedulerJobCounts" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "SummarizeSchedulerJobCounts", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdatePatch Updates the Patch +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdatePatch.go.html to see an example of how to use UpdatePatch API. +// A default retry strategy applies to this operation UpdatePatch() +func (client FleetAppsManagementOperationsClient) UpdatePatch(ctx context.Context, request UpdatePatchRequest) (response UpdatePatchResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updatePatch, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdatePatchResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdatePatchResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdatePatchResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdatePatchResponse") + } + return +} + +// updatePatch implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementOperationsClient) updatePatch(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/patches/{patchId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdatePatchResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Patch/UpdatePatch" + err = common.PostProcessServiceError(err, "FleetAppsManagementOperations", "UpdatePatch", apiReferenceLink) return response, err } @@ -735,7 +1502,7 @@ func (client FleetAppsManagementOperationsClient) listSchedulerJobs(ctx context. return response, err } -// UpdateSchedulerDefinition Updates the SchedulerDefinition +// UpdateSchedulerDefinition Update the details of a SchedulerDefinition that performs lifecycle management operations. // // # See also // @@ -793,7 +1560,7 @@ func (client FleetAppsManagementOperationsClient) updateSchedulerDefinition(ctx return response, err } -// UpdateSchedulerJob Updates the SchedulerJob +// UpdateSchedulerJob Update a lifecycle operation job schedule in Fleet Application Management. // // # See also // diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go index 5ea1cc2aa7e..df99e39546e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/fleetappsmanagement_fleetappsmanagementrunbooks_client.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -92,7 +91,249 @@ func (client *FleetAppsManagementRunbooksClient) ConfigurationProvider() *common return client.config } -// GetRunbook Gets a Runbook by identifier +// CreateRunbook Creates a new Runbook. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateRunbook.go.html to see an example of how to use CreateRunbook API. +// A default retry strategy applies to this operation CreateRunbook() +func (client FleetAppsManagementRunbooksClient) CreateRunbook(ctx context.Context, request CreateRunbookRequest) (response CreateRunbookResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createRunbook, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateRunbookResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateRunbookResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateRunbookResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateRunbookResponse") + } + return +} + +// createRunbook implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) createRunbook(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/runbooks", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateRunbookResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Runbook/CreateRunbook" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "CreateRunbook", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// CreateTaskRecord Creates a new Task. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/CreateTaskRecord.go.html to see an example of how to use CreateTaskRecord API. +// A default retry strategy applies to this operation CreateTaskRecord() +func (client FleetAppsManagementRunbooksClient) CreateTaskRecord(ctx context.Context, request CreateTaskRecordRequest) (response CreateTaskRecordResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.createTaskRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = CreateTaskRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = CreateTaskRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(CreateTaskRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into CreateTaskRecordResponse") + } + return +} + +// createTaskRecord implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) createTaskRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/taskRecords", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response CreateTaskRecordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/TaskRecord/CreateTaskRecord" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "CreateTaskRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteRunbook Deletes a Runbook resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteRunbook.go.html to see an example of how to use DeleteRunbook API. +// A default retry strategy applies to this operation DeleteRunbook() +func (client FleetAppsManagementRunbooksClient) DeleteRunbook(ctx context.Context, request DeleteRunbookRequest) (response DeleteRunbookResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteRunbook, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteRunbookResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteRunbookResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteRunbookResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteRunbookResponse") + } + return +} + +// deleteRunbook implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) deleteRunbook(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/runbooks/{runbookId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteRunbookResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Runbook/DeleteRunbook" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "DeleteRunbook", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// DeleteTaskRecord Deletes a Task Record resource by identifier +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/DeleteTaskRecord.go.html to see an example of how to use DeleteTaskRecord API. +// A default retry strategy applies to this operation DeleteTaskRecord() +func (client FleetAppsManagementRunbooksClient) DeleteTaskRecord(ctx context.Context, request DeleteTaskRecordRequest) (response DeleteTaskRecordResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.deleteTaskRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = DeleteTaskRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = DeleteTaskRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(DeleteTaskRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into DeleteTaskRecordResponse") + } + return +} + +// deleteTaskRecord implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) deleteTaskRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodDelete, "/taskRecords/{taskRecordId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response DeleteTaskRecordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/TaskRecord/DeleteTaskRecord" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "DeleteTaskRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// GetRunbook Get the details of a runbook in Fleet Application Management. // // # See also // @@ -150,7 +391,7 @@ func (client FleetAppsManagementRunbooksClient) getRunbook(ctx context.Context, return response, err } -// GetTaskRecord Gets a TaskRecord by identifier +// GetTaskRecord Gets a Task by identifier // // # See also // @@ -208,7 +449,7 @@ func (client FleetAppsManagementRunbooksClient) getTaskRecord(ctx context.Contex return response, err } -// ListRunbooks Returns a list of Runbooks. +// ListRunbooks List runbooks in Fleet Application Management. // // # See also // @@ -323,3 +564,245 @@ func (client FleetAppsManagementRunbooksClient) listTaskRecords(ctx context.Cont err = common.UnmarshalResponse(httpResponse, &response) return response, err } + +// PublishRunbook Publish a Runbook. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/PublishRunbook.go.html to see an example of how to use PublishRunbook API. +// A default retry strategy applies to this operation PublishRunbook() +func (client FleetAppsManagementRunbooksClient) PublishRunbook(ctx context.Context, request PublishRunbookRequest) (response PublishRunbookResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.publishRunbook, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = PublishRunbookResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = PublishRunbookResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(PublishRunbookResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into PublishRunbookResponse") + } + return +} + +// publishRunbook implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) publishRunbook(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/runbooks/actions/publishRunbook", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response PublishRunbookResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Runbook/PublishRunbook" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "PublishRunbook", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// SetDefaultRunbook Publish a Runbook. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SetDefaultRunbook.go.html to see an example of how to use SetDefaultRunbook API. +// A default retry strategy applies to this operation SetDefaultRunbook() +func (client FleetAppsManagementRunbooksClient) SetDefaultRunbook(ctx context.Context, request SetDefaultRunbookRequest) (response SetDefaultRunbookResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + + if !(request.OpcRetryToken != nil && *request.OpcRetryToken != "") { + request.OpcRetryToken = common.String(common.RetryToken()) + } + + ociResponse, err = common.Retry(ctx, request, client.setDefaultRunbook, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SetDefaultRunbookResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SetDefaultRunbookResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SetDefaultRunbookResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SetDefaultRunbookResponse") + } + return +} + +// setDefaultRunbook implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) setDefaultRunbook(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPost, "/runbooks/actions/setDefaultRunbook", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response SetDefaultRunbookResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Runbook/SetDefaultRunbook" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "SetDefaultRunbook", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateRunbook Updates the Ronbook +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateRunbook.go.html to see an example of how to use UpdateRunbook API. +// A default retry strategy applies to this operation UpdateRunbook() +func (client FleetAppsManagementRunbooksClient) UpdateRunbook(ctx context.Context, request UpdateRunbookRequest) (response UpdateRunbookResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateRunbook, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateRunbookResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateRunbookResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateRunbookResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateRunbookResponse") + } + return +} + +// updateRunbook implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) updateRunbook(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/runbooks/{runbookId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateRunbookResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/Runbook/UpdateRunbook" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "UpdateRunbook", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + +// UpdateTaskRecord Updates the Task +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateTaskRecord.go.html to see an example of how to use UpdateTaskRecord API. +// A default retry strategy applies to this operation UpdateTaskRecord() +func (client FleetAppsManagementRunbooksClient) UpdateTaskRecord(ctx context.Context, request UpdateTaskRecordRequest) (response UpdateTaskRecordResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.updateTaskRecord, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = UpdateTaskRecordResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = UpdateTaskRecordResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(UpdateTaskRecordResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into UpdateTaskRecordResponse") + } + return +} + +// updateTaskRecord implements the OCIOperation interface (enables retrying operations) +func (client FleetAppsManagementRunbooksClient) updateTaskRecord(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodPut, "/taskRecords/{taskRecordId}", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response UpdateTaskRecordResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/fleet-management/20230831/TaskRecord/UpdateTaskRecord" + err = common.PostProcessServiceError(err, "FleetAppsManagementRunbooks", "UpdateTaskRecord", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_details.go index 7b57103cc67..1a308f7565c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,11 @@ import ( "strings" ) -// GenerateComplianceReportDetails Request to generate compliance report fort the fleet +// GenerateComplianceReportDetails Request to generate compliance report for the fleet. type GenerateComplianceReportDetails struct { - // Are compliance details required at target level also + // A value that specifies if compliance details are required at the target level also? + // Allowed values are N and Y. AreDetailsRequired *string `mandatory:"false" json:"areDetailsRequired"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_request_response.go index bce691f01aa..c38d2ea58df 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generate_compliance_report_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GenerateComplianceReport.go.html to see an example of how to use GenerateComplianceReportRequest. type GenerateComplianceReportRequest struct { - // Details for generating Compliance Report fort the Fleet. + // Details for generating Compliance Report for the Fleet. GenerateComplianceReportDetails `contributesTo:"body"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact.go new file mode 100644 index 00000000000..984ddccd7c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericArtifact Patch artifact metadata Details which is common for all platforms. +type GenericArtifact struct { + Content ContentDetails `mandatory:"true" json:"content"` +} + +func (m GenericArtifact) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericArtifact) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *GenericArtifact) UnmarshalJSON(data []byte) (e error) { + model := struct { + Content contentdetails `json:"content"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.Content.UnmarshalPolymorphicJSON(model.Content.JsonData) + if e != nil { + return + } + if nn != nil { + m.Content = nn.(ContentDetails) + } else { + m.Content = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact_details.go new file mode 100644 index 00000000000..e57ac783fd3 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/generic_artifact_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// GenericArtifactDetails Patch artifact description and content details if common for all platforms. +type GenericArtifactDetails struct { + Artifact *GenericArtifact `mandatory:"true" json:"artifact"` +} + +func (m GenericArtifactDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m GenericArtifactDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m GenericArtifactDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeGenericArtifactDetails GenericArtifactDetails + s := struct { + DiscriminatorParam string `json:"category"` + MarshalTypeGenericArtifactDetails + }{ + "GENERIC", + (MarshalTypeGenericArtifactDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_request_response.go new file mode 100644 index 00000000000..2bd4fc41688 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCompliancePolicyRequest wrapper for the GetCompliancePolicy operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetCompliancePolicy.go.html to see an example of how to use GetCompliancePolicyRequest. +type GetCompliancePolicyRequest struct { + + // unique CompliancePolicy identifier. + CompliancePolicyId *string `mandatory:"true" contributesTo:"path" name:"compliancePolicyId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCompliancePolicyRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCompliancePolicyRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCompliancePolicyRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCompliancePolicyRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCompliancePolicyRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCompliancePolicyResponse wrapper for the GetCompliancePolicy operation +type GetCompliancePolicyResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CompliancePolicy instance + CompliancePolicy `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCompliancePolicyResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCompliancePolicyResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_rule_request_response.go new file mode 100644 index 00000000000..853df795cf2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_policy_rule_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetCompliancePolicyRuleRequest wrapper for the GetCompliancePolicyRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetCompliancePolicyRule.go.html to see an example of how to use GetCompliancePolicyRuleRequest. +type GetCompliancePolicyRuleRequest struct { + + // unique CompliancePolicyRule identifier. + CompliancePolicyRuleId *string `mandatory:"true" contributesTo:"path" name:"compliancePolicyRuleId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetCompliancePolicyRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetCompliancePolicyRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetCompliancePolicyRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetCompliancePolicyRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetCompliancePolicyRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetCompliancePolicyRuleResponse wrapper for the GetCompliancePolicyRule operation +type GetCompliancePolicyRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The CompliancePolicyRule instance + CompliancePolicyRule `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetCompliancePolicyRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetCompliancePolicyRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_report_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_report_request_response.go index 25b2e4c22a8..85c4d60ecd9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_report_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_compliance_report_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetComplianceReport.go.html to see an example of how to use GetComplianceReportRequest. type GetComplianceReportRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` - // compliance report identifier + // compliance report identifier. ComplianceReportId *string `mandatory:"true" contributesTo:"path" name:"complianceReportId"` // The client request ID for tracing. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_credential_request_response.go index 44daf0ba6b3..7ccd4acf95f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_credential_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_credential_request_response.go @@ -21,7 +21,7 @@ type GetFleetCredentialRequest struct { // unique FleetCredential identifier FleetCredentialId *string `mandatory:"true" contributesTo:"path" name:"fleetCredentialId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The client request ID for tracing. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_property_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_property_request_response.go index 2fd20d21d63..e77412b8cb2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_property_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_property_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleetProperty.go.html to see an example of how to use GetFleetPropertyRequest. type GetFleetPropertyRequest struct { - // unique FleetProperty identifier + // unique FleetProperty identifier. FleetPropertyId *string `mandatory:"true" contributesTo:"path" name:"fleetPropertyId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The client request ID for tracing. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_request_response.go index 898a5c4c1bf..67440610afc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetFleet.go.html to see an example of how to use GetFleetRequest. type GetFleetRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The client request ID for tracing. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_resource_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_resource_request_response.go index 725d5e13747..0fc74ab3a26 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_resource_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_fleet_resource_request_response.go @@ -21,7 +21,7 @@ type GetFleetResourceRequest struct { // unique FleetResource identifier FleetResourceId *string `mandatory:"true" contributesTo:"path" name:"fleetResourceId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The client request ID for tracing. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_onboarding_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_onboarding_request_response.go new file mode 100644 index 00000000000..8159b42397a --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_onboarding_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetOnboardingRequest wrapper for the GetOnboarding operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetOnboarding.go.html to see an example of how to use GetOnboardingRequest. +type GetOnboardingRequest struct { + + // A filter to return resources whose Onboarding identifier matches the given identifier. + OnboardingId *string `mandatory:"true" contributesTo:"path" name:"onboardingId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetOnboardingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetOnboardingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetOnboardingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetOnboardingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetOnboardingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetOnboardingResponse wrapper for the GetOnboarding operation +type GetOnboardingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Onboarding instance + Onboarding `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetOnboardingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetOnboardingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_patch_request_response.go new file mode 100644 index 00000000000..d568c9fc6c5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_patch_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPatchRequest wrapper for the GetPatch operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetPatch.go.html to see an example of how to use GetPatchRequest. +type GetPatchRequest struct { + + // unique Patch identifier + PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPatchRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPatchRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPatchRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPatchRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPatchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPatchResponse wrapper for the GetPatch operation +type GetPatchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Patch instance + Patch `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPatchResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPatchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_platform_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_platform_configuration_request_response.go new file mode 100644 index 00000000000..ebd9a8aa896 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/get_platform_configuration_request_response.go @@ -0,0 +1,93 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// GetPlatformConfigurationRequest wrapper for the GetPlatformConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/GetPlatformConfiguration.go.html to see an example of how to use GetPlatformConfigurationRequest. +type GetPlatformConfigurationRequest struct { + + // unique PlatformConfiguration identifier + PlatformConfigurationId *string `mandatory:"true" contributesTo:"path" name:"platformConfigurationId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request GetPlatformConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request GetPlatformConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request GetPlatformConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request GetPlatformConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request GetPlatformConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// GetPlatformConfigurationResponse wrapper for the GetPlatformConfiguration operation +type GetPlatformConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The PlatformConfiguration instance + PlatformConfiguration `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response GetPlatformConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response GetPlatformConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/group.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/group.go index ce8266f4a2f..52202030178 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/group.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,13 +15,16 @@ import ( "strings" ) -// Group The group of the runbook +// Group The group of the runbook. type Group struct { - // The type of the group + // The type of the group. + // PARALLEL_TASK_GROUP : Helps to execute tasks parallelly inside a resource. + // PARALLEL_RESOURCE_GROUP : Executes tasks across resources parallelly. + // ROLLING_RESOURCE_GROUP : Executes tasks across resources in a rolling order. Type GroupTypeEnum `mandatory:"true" json:"type"` - // The name of the group + // The name of the group. Name *string `mandatory:"true" json:"name"` Properties *ComponentProperties `mandatory:"false" json:"properties"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_argument.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_argument.go index 844dadbefa0..f8d1cf0f425 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_argument.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_argument.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -20,7 +19,7 @@ import ( // InputArgument The details of the Input argument. type InputArgument interface { - // The name of the argument + // The name of the argument. GetName() *string // The description of the argument. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_parameter.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_parameter.go index 53abfc2a3c6..78fff9ad311 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_parameter.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/input_parameter.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_collection.go index 35cecb58d96..880c1109b5b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_summary.go index 49659841eb0..5b373aa2652 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/inventory_resource_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -44,13 +43,13 @@ type InventoryResourceSummary struct { // Example: `{"foo-namespace": {"bar-key": "value"}}` DefinedTags map[string]map[string]interface{} `mandatory:"true" json:"definedTags"` - // Compartment Id of the resource + // Compartment Id of the resource. ResourceCompartmentId *string `mandatory:"false" json:"resourceCompartmentId"` - // Availability Domain of the resource + // Availability Domain of the resource. AvailabilityDomain *string `mandatory:"false" json:"availabilityDomain"` - // Region the resource belongs to + // The region the resource belongs to. ResourceRegion *string `mandatory:"false" json:"resourceRegion"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_activity.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_activity.go index 817c6a63717..3e4add2aff2 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_activity.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_activity.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,28 +15,33 @@ import ( "strings" ) -// JobActivity Description of JobActivity. +// JobActivity Activity details including status corresponding to an Action Group. type JobActivity struct { - // Unique activity id at action group level + // Unique activity id at the action group level. + // In most cases, this would be a generated ActionGroupId. Id *string `mandatory:"true" json:"id"` - // Status of the Job at Action Group Level + // Status of the Job at Action Group Level. Status JobStatusEnum `mandatory:"true" json:"status"` - // The time the the Scheduler Job started. An RFC3339 formatted datetime string + // The time the execution for the Action Group started. An RFC3339 formatted datetime string. TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - // The time the Scheduler Job ended. An RFC3339 formatted datetime string + // The time the execution for the Action Group ended. An RFC3339 formatted datetime string TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` - // ID of the runbook + // OCID of the runbook associated with the Action Group. RunbookId *string `mandatory:"false" json:"runbookId"` - // Name of the runbook + // Name of the runbook associated with the Action Group. RunbookName *string `mandatory:"false" json:"runbookName"` - // Resources execution details and outcomes associated with the Task. + // A description of the Job Activity status. + // If there are any errors, this can also include a short error message. + Description *string `mandatory:"false" json:"description"` + + // List of Resource executions associated with the Action Group. ResourceLevelExecutions []EntityExecutionDetails `mandatory:"false" json:"resourceLevelExecutions"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_status.go index e92e7cb6b41..86368819115 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_status.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/job_status.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -30,6 +29,7 @@ const ( JobStatusNotApplicable JobStatusEnum = "NOT_APPLICABLE" JobStatusAborted JobStatusEnum = "ABORTED" JobStatusTimedOut JobStatusEnum = "TIMED_OUT" + JobStatusPaused JobStatusEnum = "PAUSED" ) var mappingJobStatusEnum = map[string]JobStatusEnum{ @@ -44,6 +44,7 @@ var mappingJobStatusEnum = map[string]JobStatusEnum{ "NOT_APPLICABLE": JobStatusNotApplicable, "ABORTED": JobStatusAborted, "TIMED_OUT": JobStatusTimedOut, + "PAUSED": JobStatusPaused, } var mappingJobStatusEnumLowerCase = map[string]JobStatusEnum{ @@ -58,6 +59,7 @@ var mappingJobStatusEnumLowerCase = map[string]JobStatusEnum{ "not_applicable": JobStatusNotApplicable, "aborted": JobStatusAborted, "timed_out": JobStatusTimedOut, + "paused": JobStatusPaused, } // GetJobStatusEnumValues Enumerates the set of values for JobStatusEnum @@ -83,6 +85,7 @@ func GetJobStatusEnumStringValues() []string { "NOT_APPLICABLE", "ABORTED", "TIMED_OUT", + "PAUSED", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/key_encryption_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/key_encryption_credential_details.go index 99f0bc1f35f..0852c49ff6c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/key_encryption_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/key_encryption_credential_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,16 +16,16 @@ import ( "strings" ) -// KeyEncryptionCredentialDetails Details for Credentials using key encryption. +// KeyEncryptionCredentialDetails Details for the Credentials that use key encryption. type KeyEncryptionCredentialDetails struct { - // The value corresponding to the credential + // The value corresponding to the credential. Value *string `mandatory:"true" json:"value"` // OCID for the Vault Key that will be used to encrypt/decrypt the value given. KeyId *string `mandatory:"true" json:"keyId"` - // OCID for the Vault that will be used to fetch key to encrypt/decrypt the value given. + // OCID for the Vault that will be used to fetch the key to encrypt/decrypt the value given. VaultId *string `mandatory:"true" json:"vaultId"` // The Vault Key version. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/life_cycle_action_group_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/life_cycle_action_group_type.go index 252c797945f..b03a7829fdf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/life_cycle_action_group_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/life_cycle_action_group_type.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_announcements_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_announcements_request_response.go index da795e81199..90fb7ed22c9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_announcements_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_announcements_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListAnnouncements.go.html to see an example of how to use ListAnnouncementsRequest. type ListAnnouncementsRequest struct { - // Filter the list with summary contains the given value. + // Filter the list of announcements that contains the given summary value. SummaryContains *string `mandatory:"false" contributesTo:"query" name:"summaryContains"` // A filter to return only resources that match the entire display name given. @@ -33,8 +33,8 @@ type ListAnnouncementsRequest struct { // The sort order to use, either 'ASC' or 'DESC'. SortOrder ListAnnouncementsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` - // The field to sort AnnouncementSummary by. Only one sort order may be provided. - // If no value is specified _timeReleased_ is default. + // The field to sort AnnouncementSummary by. Only one sort order may be provided. + // If no value is specified timeReleased is default. SortBy ListAnnouncementsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` // The client request ID for tracing. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policies_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policies_request_response.go new file mode 100644 index 00000000000..7b7d1ee1852 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policies_request_response.go @@ -0,0 +1,210 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCompliancePoliciesRequest wrapper for the ListCompliancePolicies operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListCompliancePolicies.go.html to see an example of how to use ListCompliancePoliciesRequest. +type ListCompliancePoliciesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the given lifecycle state. The + // state value is case-insensitive. + LifecycleState CompliancePolicyLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique CompliancePolicy identifier. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListCompliancePoliciesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListCompliancePoliciesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCompliancePoliciesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCompliancePoliciesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCompliancePoliciesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCompliancePoliciesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCompliancePoliciesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCompliancePolicyLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetCompliancePolicyLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListCompliancePoliciesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCompliancePoliciesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListCompliancePoliciesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListCompliancePoliciesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCompliancePoliciesResponse wrapper for the ListCompliancePolicies operation +type ListCompliancePoliciesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CompliancePolicyCollection instances + CompliancePolicyCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCompliancePoliciesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCompliancePoliciesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCompliancePoliciesSortOrderEnum Enum with underlying type: string +type ListCompliancePoliciesSortOrderEnum string + +// Set of constants representing the allowable values for ListCompliancePoliciesSortOrderEnum +const ( + ListCompliancePoliciesSortOrderAsc ListCompliancePoliciesSortOrderEnum = "ASC" + ListCompliancePoliciesSortOrderDesc ListCompliancePoliciesSortOrderEnum = "DESC" +) + +var mappingListCompliancePoliciesSortOrderEnum = map[string]ListCompliancePoliciesSortOrderEnum{ + "ASC": ListCompliancePoliciesSortOrderAsc, + "DESC": ListCompliancePoliciesSortOrderDesc, +} + +var mappingListCompliancePoliciesSortOrderEnumLowerCase = map[string]ListCompliancePoliciesSortOrderEnum{ + "asc": ListCompliancePoliciesSortOrderAsc, + "desc": ListCompliancePoliciesSortOrderDesc, +} + +// GetListCompliancePoliciesSortOrderEnumValues Enumerates the set of values for ListCompliancePoliciesSortOrderEnum +func GetListCompliancePoliciesSortOrderEnumValues() []ListCompliancePoliciesSortOrderEnum { + values := make([]ListCompliancePoliciesSortOrderEnum, 0) + for _, v := range mappingListCompliancePoliciesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCompliancePoliciesSortOrderEnumStringValues Enumerates the set of values in String for ListCompliancePoliciesSortOrderEnum +func GetListCompliancePoliciesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListCompliancePoliciesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCompliancePoliciesSortOrderEnum(val string) (ListCompliancePoliciesSortOrderEnum, bool) { + enum, ok := mappingListCompliancePoliciesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListCompliancePoliciesSortByEnum Enum with underlying type: string +type ListCompliancePoliciesSortByEnum string + +// Set of constants representing the allowable values for ListCompliancePoliciesSortByEnum +const ( + ListCompliancePoliciesSortByTimecreated ListCompliancePoliciesSortByEnum = "timeCreated" + ListCompliancePoliciesSortByDisplayname ListCompliancePoliciesSortByEnum = "displayName" +) + +var mappingListCompliancePoliciesSortByEnum = map[string]ListCompliancePoliciesSortByEnum{ + "timeCreated": ListCompliancePoliciesSortByTimecreated, + "displayName": ListCompliancePoliciesSortByDisplayname, +} + +var mappingListCompliancePoliciesSortByEnumLowerCase = map[string]ListCompliancePoliciesSortByEnum{ + "timecreated": ListCompliancePoliciesSortByTimecreated, + "displayname": ListCompliancePoliciesSortByDisplayname, +} + +// GetListCompliancePoliciesSortByEnumValues Enumerates the set of values for ListCompliancePoliciesSortByEnum +func GetListCompliancePoliciesSortByEnumValues() []ListCompliancePoliciesSortByEnum { + values := make([]ListCompliancePoliciesSortByEnum, 0) + for _, v := range mappingListCompliancePoliciesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListCompliancePoliciesSortByEnumStringValues Enumerates the set of values in String for ListCompliancePoliciesSortByEnum +func GetListCompliancePoliciesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListCompliancePoliciesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCompliancePoliciesSortByEnum(val string) (ListCompliancePoliciesSortByEnum, bool) { + enum, ok := mappingListCompliancePoliciesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policy_rules_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policy_rules_request_response.go new file mode 100644 index 00000000000..4e3679bb520 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_policy_rules_request_response.go @@ -0,0 +1,216 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListCompliancePolicyRulesRequest wrapper for the ListCompliancePolicyRules operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListCompliancePolicyRules.go.html to see an example of how to use ListCompliancePolicyRulesRequest. +type ListCompliancePolicyRulesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // A filter to return only resources that match the given lifecycle state. The + // state value is case-insensitive. + LifecycleState CompliancePolicyRuleLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the patch selection against the given patch name. + PatchName *string `mandatory:"false" contributesTo:"query" name:"patchName"` + + // unique CompliancePolicy identifier. + CompliancePolicyId *string `mandatory:"false" contributesTo:"query" name:"compliancePolicyId"` + + // unique CompliancePolicyRule identifier. + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListCompliancePolicyRulesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListCompliancePolicyRulesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListCompliancePolicyRulesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListCompliancePolicyRulesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListCompliancePolicyRulesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListCompliancePolicyRulesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListCompliancePolicyRulesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingCompliancePolicyRuleLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetCompliancePolicyRuleLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListCompliancePolicyRulesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListCompliancePolicyRulesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListCompliancePolicyRulesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListCompliancePolicyRulesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListCompliancePolicyRulesResponse wrapper for the ListCompliancePolicyRules operation +type ListCompliancePolicyRulesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of CompliancePolicyRuleCollection instances + CompliancePolicyRuleCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListCompliancePolicyRulesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListCompliancePolicyRulesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListCompliancePolicyRulesSortOrderEnum Enum with underlying type: string +type ListCompliancePolicyRulesSortOrderEnum string + +// Set of constants representing the allowable values for ListCompliancePolicyRulesSortOrderEnum +const ( + ListCompliancePolicyRulesSortOrderAsc ListCompliancePolicyRulesSortOrderEnum = "ASC" + ListCompliancePolicyRulesSortOrderDesc ListCompliancePolicyRulesSortOrderEnum = "DESC" +) + +var mappingListCompliancePolicyRulesSortOrderEnum = map[string]ListCompliancePolicyRulesSortOrderEnum{ + "ASC": ListCompliancePolicyRulesSortOrderAsc, + "DESC": ListCompliancePolicyRulesSortOrderDesc, +} + +var mappingListCompliancePolicyRulesSortOrderEnumLowerCase = map[string]ListCompliancePolicyRulesSortOrderEnum{ + "asc": ListCompliancePolicyRulesSortOrderAsc, + "desc": ListCompliancePolicyRulesSortOrderDesc, +} + +// GetListCompliancePolicyRulesSortOrderEnumValues Enumerates the set of values for ListCompliancePolicyRulesSortOrderEnum +func GetListCompliancePolicyRulesSortOrderEnumValues() []ListCompliancePolicyRulesSortOrderEnum { + values := make([]ListCompliancePolicyRulesSortOrderEnum, 0) + for _, v := range mappingListCompliancePolicyRulesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListCompliancePolicyRulesSortOrderEnumStringValues Enumerates the set of values in String for ListCompliancePolicyRulesSortOrderEnum +func GetListCompliancePolicyRulesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListCompliancePolicyRulesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCompliancePolicyRulesSortOrderEnum(val string) (ListCompliancePolicyRulesSortOrderEnum, bool) { + enum, ok := mappingListCompliancePolicyRulesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListCompliancePolicyRulesSortByEnum Enum with underlying type: string +type ListCompliancePolicyRulesSortByEnum string + +// Set of constants representing the allowable values for ListCompliancePolicyRulesSortByEnum +const ( + ListCompliancePolicyRulesSortByTimecreated ListCompliancePolicyRulesSortByEnum = "timeCreated" + ListCompliancePolicyRulesSortByDisplayname ListCompliancePolicyRulesSortByEnum = "displayName" +) + +var mappingListCompliancePolicyRulesSortByEnum = map[string]ListCompliancePolicyRulesSortByEnum{ + "timeCreated": ListCompliancePolicyRulesSortByTimecreated, + "displayName": ListCompliancePolicyRulesSortByDisplayname, +} + +var mappingListCompliancePolicyRulesSortByEnumLowerCase = map[string]ListCompliancePolicyRulesSortByEnum{ + "timecreated": ListCompliancePolicyRulesSortByTimecreated, + "displayname": ListCompliancePolicyRulesSortByDisplayname, +} + +// GetListCompliancePolicyRulesSortByEnumValues Enumerates the set of values for ListCompliancePolicyRulesSortByEnum +func GetListCompliancePolicyRulesSortByEnumValues() []ListCompliancePolicyRulesSortByEnum { + values := make([]ListCompliancePolicyRulesSortByEnum, 0) + for _, v := range mappingListCompliancePolicyRulesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListCompliancePolicyRulesSortByEnumStringValues Enumerates the set of values in String for ListCompliancePolicyRulesSortByEnum +func GetListCompliancePolicyRulesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListCompliancePolicyRulesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListCompliancePolicyRulesSortByEnum(val string) (ListCompliancePolicyRulesSortByEnum, bool) { + enum, ok := mappingListCompliancePolicyRulesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_records_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_records_request_response.go new file mode 100644 index 00000000000..0f1717f9e18 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_compliance_records_request_response.go @@ -0,0 +1,215 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListComplianceRecordsRequest wrapper for the ListComplianceRecords operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListComplianceRecords.go.html to see an example of how to use ListComplianceRecordsRequest. +type ListComplianceRecordsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Resource identifier. + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // Entity identifier.Ex:FleetId + EntityId *string `mandatory:"false" contributesTo:"query" name:"entityId"` + + // Product Name. + ProductName *string `mandatory:"false" contributesTo:"query" name:"productName"` + + // ProductStack name. + ProductStack *string `mandatory:"false" contributesTo:"query" name:"productStack"` + + // Unique target name + TargetName *string `mandatory:"false" contributesTo:"query" name:"targetName"` + + // Target Compliance State. + ComplianceState *string `mandatory:"false" contributesTo:"query" name:"complianceState"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListComplianceRecordsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListComplianceRecordsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListComplianceRecordsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListComplianceRecordsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListComplianceRecordsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListComplianceRecordsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListComplianceRecordsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListComplianceRecordsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListComplianceRecordsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListComplianceRecordsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListComplianceRecordsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListComplianceRecordsResponse wrapper for the ListComplianceRecords operation +type ListComplianceRecordsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComplianceRecordCollection instances + ComplianceRecordCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListComplianceRecordsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListComplianceRecordsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListComplianceRecordsSortOrderEnum Enum with underlying type: string +type ListComplianceRecordsSortOrderEnum string + +// Set of constants representing the allowable values for ListComplianceRecordsSortOrderEnum +const ( + ListComplianceRecordsSortOrderAsc ListComplianceRecordsSortOrderEnum = "ASC" + ListComplianceRecordsSortOrderDesc ListComplianceRecordsSortOrderEnum = "DESC" +) + +var mappingListComplianceRecordsSortOrderEnum = map[string]ListComplianceRecordsSortOrderEnum{ + "ASC": ListComplianceRecordsSortOrderAsc, + "DESC": ListComplianceRecordsSortOrderDesc, +} + +var mappingListComplianceRecordsSortOrderEnumLowerCase = map[string]ListComplianceRecordsSortOrderEnum{ + "asc": ListComplianceRecordsSortOrderAsc, + "desc": ListComplianceRecordsSortOrderDesc, +} + +// GetListComplianceRecordsSortOrderEnumValues Enumerates the set of values for ListComplianceRecordsSortOrderEnum +func GetListComplianceRecordsSortOrderEnumValues() []ListComplianceRecordsSortOrderEnum { + values := make([]ListComplianceRecordsSortOrderEnum, 0) + for _, v := range mappingListComplianceRecordsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListComplianceRecordsSortOrderEnumStringValues Enumerates the set of values in String for ListComplianceRecordsSortOrderEnum +func GetListComplianceRecordsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListComplianceRecordsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComplianceRecordsSortOrderEnum(val string) (ListComplianceRecordsSortOrderEnum, bool) { + enum, ok := mappingListComplianceRecordsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListComplianceRecordsSortByEnum Enum with underlying type: string +type ListComplianceRecordsSortByEnum string + +// Set of constants representing the allowable values for ListComplianceRecordsSortByEnum +const ( + ListComplianceRecordsSortByTimecreated ListComplianceRecordsSortByEnum = "timeCreated" + ListComplianceRecordsSortByDisplayname ListComplianceRecordsSortByEnum = "displayName" +) + +var mappingListComplianceRecordsSortByEnum = map[string]ListComplianceRecordsSortByEnum{ + "timeCreated": ListComplianceRecordsSortByTimecreated, + "displayName": ListComplianceRecordsSortByDisplayname, +} + +var mappingListComplianceRecordsSortByEnumLowerCase = map[string]ListComplianceRecordsSortByEnum{ + "timecreated": ListComplianceRecordsSortByTimecreated, + "displayname": ListComplianceRecordsSortByDisplayname, +} + +// GetListComplianceRecordsSortByEnumValues Enumerates the set of values for ListComplianceRecordsSortByEnum +func GetListComplianceRecordsSortByEnumValues() []ListComplianceRecordsSortByEnum { + values := make([]ListComplianceRecordsSortByEnum, 0) + for _, v := range mappingListComplianceRecordsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListComplianceRecordsSortByEnumStringValues Enumerates the set of values in String for ListComplianceRecordsSortByEnum +func GetListComplianceRecordsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListComplianceRecordsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListComplianceRecordsSortByEnum(val string) (ListComplianceRecordsSortByEnum, bool) { + enum, ok := mappingListComplianceRecordsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_credentials_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_credentials_request_response.go index 4248c10b88b..ecfc6748242 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_credentials_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_credentials_request_response.go @@ -18,22 +18,28 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetCredentials.go.html to see an example of how to use ListFleetCredentialsRequest. type ListFleetCredentialsRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState FleetCredentialLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // Credential Level. + // Resource Identifier + ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` + + // A filter to return only resources whose target matches the given target name. + Target *string `mandatory:"false" contributesTo:"query" name:"target"` + + // A filter to return only resources whose credentialLevel matches the given credentialLevel. CredentialLevel CredentialEntitySpecificDetailsCredentialLevelEnum `mandatory:"false" contributesTo:"query" name:"credentialLevel" omitEmpty:"true"` - // unique FleetCredential identifier + // A filter to return only resources whose credential identifier matches the given identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_products_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_products_request_response.go index 27bbeb82a0f..41761d8bd49 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_products_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_products_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetProducts.go.html to see an example of how to use ListFleetProductsRequest. type ListFleetProductsRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The ID of the compartment in which to list resources. @@ -27,7 +27,7 @@ type ListFleetProductsRequest struct { // Resource Identifier ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` - // Resource Display Name + // Resource Display Name. ResourceDisplayName *string `mandatory:"false" contributesTo:"query" name:"resourceDisplayName"` // A filter to return only resources that match the entire display name given. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_properties_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_properties_request_response.go index cec6f149f38..a314114d320 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_properties_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_properties_request_response.go @@ -18,19 +18,19 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetProperties.go.html to see an example of how to use ListFleetPropertiesRequest. type ListFleetPropertiesRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState FleetPropertyLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // unique FleetProperty identifier + // A filter to return only resources whose fleetProperty identifier matches the given identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_resources_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_resources_request_response.go index e49139c41d7..f84b36615f0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_resources_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_resources_request_response.go @@ -18,22 +18,22 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetResources.go.html to see an example of how to use ListFleetResourcesRequest. type ListFleetResourcesRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // Resource Tenancy Id TenancyId *string `mandatory:"false" contributesTo:"query" name:"tenancyId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState FleetResourceLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // unique FleetResource identifier + // A filter to return only resources whose identifier matches the given identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` - // A filter to return resources that match the Type + // A filter to return only resources whose resourceType matches the given resourceType. FleetResourceType *string `mandatory:"false" contributesTo:"query" name:"fleetResourceType"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_targets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_targets_request_response.go index 6fbefe30964..9de3f83e33d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_targets_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleet_targets_request_response.go @@ -18,19 +18,19 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleetTargets.go.html to see an example of how to use ListFleetTargetsRequest. type ListFleetTargetsRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // Product Name + // Product Name. Product *string `mandatory:"false" contributesTo:"query" name:"product"` // Resource Identifier ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` - // Resource Display Name + // Resource Display Name. ResourceDisplayName *string `mandatory:"false" contributesTo:"query" name:"resourceDisplayName"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleets_request_response.go index eb501ea74bc..99107e5bee7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleets_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_fleets_request_response.go @@ -18,28 +18,28 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListFleets.go.html to see an example of how to use ListFleetsRequest. type ListFleetsRequest struct { - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return fleets whose lifecycleState matches the given lifecycleState. LifecycleState FleetLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their fleetType matches the given fleetType. + // A filter to return fleets whose fleetType matches the given fleetType. FleetType FleetFleetTypeEnum `mandatory:"false" contributesTo:"query" name:"fleetType" omitEmpty:"true"` - // A filter to return only resources that match the Application Type given. + // A filter to return resources that match the Application Type/Product Stack given.. ApplicationType *string `mandatory:"false" contributesTo:"query" name:"applicationType"` - // A filter to return only resources that match the Product Type given. + // A filter to return resources that match the Product given. Product *string `mandatory:"false" contributesTo:"query" name:"product"` - // A filter to return only resources that match the Environment Type given. + // A filter to return resources that match the Environment Type given. EnvironmentType *string `mandatory:"false" contributesTo:"query" name:"environmentType"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // unique Fleet identifier + // A filter to return fleets whose id matches the given Fleet identifier Id *string `mandatory:"false" contributesTo:"query" name:"id"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_inventory_resources_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_inventory_resources_request_response.go index 93b4cf1e0eb..e3af54014e5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_inventory_resources_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_inventory_resources_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListInventoryResources.go.html to see an example of how to use ListInventoryResourcesRequest. type ListInventoryResourcesRequest struct { - // The ID of the compartment in which to list resources. + // A filter to return only resources whose base Compartment ID(TenancyId) matches the given base Compartment ID. CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` - // Resource Compartment ID + // A filter to return only resources whose resource Compartment ID matches the given resource Compartment ID. ResourceCompartmentId *string `mandatory:"true" contributesTo:"query" name:"resourceCompartmentId"` // A filter to return only resources their lifecycleState matches the given lifecycleState. @@ -37,6 +37,7 @@ type ListInventoryResourcesRequest struct { // Each item in the list has the format "{namespace}.{tagName}={value}". All inputs are case-insensitive. // Multiple values for the same key (i.e. same namespace and tag name) are interpreted as "OR". // Values for different keys (i.e. different namespaces, different tag names, or both) are interpreted as "AND". + // Example: Identification.Development=Yes DefinedTagEquals []string `contributesTo:"query" name:"definedTagEquals" collectionFormat:"multi"` // A list of tag filters to apply. Only resources with a freeform tag matching the value will be returned. @@ -46,9 +47,11 @@ type ListInventoryResourcesRequest struct { // A list of inventory properties filters to apply. // The key for each inventory property and value for each resource type is "{resourceType}.{inventoryProperty}={value}". + // Example: Instance.displayName=TEST_INSTANCE InventoryProperties []string `contributesTo:"query" name:"inventoryProperties" collectionFormat:"multi"` - // Fetch resources matching matching ANY or ALL criteria passed as params in "tags" and "inventoryProperties" + // Fetch resources matching ANY or ALL criteria passed as params in "tags" and "inventoryProperties". + // Example: matchingCriteria=ANY MatchingCriteria *string `mandatory:"false" contributesTo:"query" name:"matchingCriteria"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_maintenance_windows_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_maintenance_windows_request_response.go index de4451ebd33..4cd8dabb787 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_maintenance_windows_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_maintenance_windows_request_response.go @@ -21,13 +21,16 @@ type ListMaintenanceWindowsRequest struct { // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState MaintenanceWindowLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // unique MaintenanceWindow identifier + // A filter to return only resources whose timeScheduleStart is greater than or equal to the provided date and time. + TimeScheduleStartGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeScheduleStartGreaterThanOrEqualTo"` + + // A filter to return only the Maintenance Windows whose identifier matches the given identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_onboardings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_onboardings_request_response.go index ed3c9d9d1e7..73443b73303 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_onboardings_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_onboardings_request_response.go @@ -21,7 +21,7 @@ type ListOnboardingsRequest struct { // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState OnboardingLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // unique onboarding identifier diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_patches_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_patches_request_response.go new file mode 100644 index 00000000000..ea36dc86e98 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_patches_request_response.go @@ -0,0 +1,233 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPatchesRequest wrapper for the ListPatches operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListPatches.go.html to see an example of how to use ListPatchesRequest. +type ListPatchesRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // Product platformConfigurationId associated with the Patch. + ProductId *string `mandatory:"false" contributesTo:"query" name:"productId"` + + // Product version + Version *string `mandatory:"false" contributesTo:"query" name:"version"` + + // DefinedBy type. + Type PatchTypeEnum `mandatory:"false" contributesTo:"query" name:"type" omitEmpty:"true"` + + // Patch Type platformConfigurationId associated with the Patch. + PatchTypeId *string `mandatory:"false" contributesTo:"query" name:"patchTypeId"` + + // A filter to return only resources that match the entire name given. + Name *string `mandatory:"false" contributesTo:"query" name:"name"` + + // unique Patch identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // Patch Released Date + TimeReleasedGreaterThanOrEqualTo *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeReleasedGreaterThanOrEqualTo"` + + // Patch Released Date + TimeReleasedLessThan *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeReleasedLessThan"` + + // Filter patch based on compliance policy rules for the Product + ShouldCompliancePolicyRulesBeApplied *bool `mandatory:"false" contributesTo:"query" name:"shouldCompliancePolicyRulesBeApplied"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The current state of the Patch. + LifecycleState PatchLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListPatchesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListPatchesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPatchesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPatchesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPatchesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPatchesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPatchesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchTypeEnum(string(request.Type)); !ok && request.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", request.Type, strings.Join(GetPatchTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPatchLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetPatchLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingListPatchesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPatchesSortByEnumStringValues(), ","))) + } + if _, ok := GetMappingListPatchesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPatchesSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPatchesResponse wrapper for the ListPatches operation +type ListPatchesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PatchCollection instances + PatchCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPatchesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPatchesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPatchesSortByEnum Enum with underlying type: string +type ListPatchesSortByEnum string + +// Set of constants representing the allowable values for ListPatchesSortByEnum +const ( + ListPatchesSortByTimecreated ListPatchesSortByEnum = "timeCreated" + ListPatchesSortByDisplayname ListPatchesSortByEnum = "displayName" +) + +var mappingListPatchesSortByEnum = map[string]ListPatchesSortByEnum{ + "timeCreated": ListPatchesSortByTimecreated, + "displayName": ListPatchesSortByDisplayname, +} + +var mappingListPatchesSortByEnumLowerCase = map[string]ListPatchesSortByEnum{ + "timecreated": ListPatchesSortByTimecreated, + "displayname": ListPatchesSortByDisplayname, +} + +// GetListPatchesSortByEnumValues Enumerates the set of values for ListPatchesSortByEnum +func GetListPatchesSortByEnumValues() []ListPatchesSortByEnum { + values := make([]ListPatchesSortByEnum, 0) + for _, v := range mappingListPatchesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPatchesSortByEnumStringValues Enumerates the set of values in String for ListPatchesSortByEnum +func GetListPatchesSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPatchesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPatchesSortByEnum(val string) (ListPatchesSortByEnum, bool) { + enum, ok := mappingListPatchesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPatchesSortOrderEnum Enum with underlying type: string +type ListPatchesSortOrderEnum string + +// Set of constants representing the allowable values for ListPatchesSortOrderEnum +const ( + ListPatchesSortOrderAsc ListPatchesSortOrderEnum = "ASC" + ListPatchesSortOrderDesc ListPatchesSortOrderEnum = "DESC" +) + +var mappingListPatchesSortOrderEnum = map[string]ListPatchesSortOrderEnum{ + "ASC": ListPatchesSortOrderAsc, + "DESC": ListPatchesSortOrderDesc, +} + +var mappingListPatchesSortOrderEnumLowerCase = map[string]ListPatchesSortOrderEnum{ + "asc": ListPatchesSortOrderAsc, + "desc": ListPatchesSortOrderDesc, +} + +// GetListPatchesSortOrderEnumValues Enumerates the set of values for ListPatchesSortOrderEnum +func GetListPatchesSortOrderEnumValues() []ListPatchesSortOrderEnum { + values := make([]ListPatchesSortOrderEnum, 0) + for _, v := range mappingListPatchesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPatchesSortOrderEnumStringValues Enumerates the set of values in String for ListPatchesSortOrderEnum +func GetListPatchesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPatchesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPatchesSortOrderEnum(val string) (ListPatchesSortOrderEnum, bool) { + enum, ok := mappingListPatchesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_platform_configurations_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_platform_configurations_request_response.go new file mode 100644 index 00000000000..d2610bffc34 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_platform_configurations_request_response.go @@ -0,0 +1,215 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListPlatformConfigurationsRequest wrapper for the ListPlatformConfigurations operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListPlatformConfigurations.go.html to see an example of how to use ListPlatformConfigurationsRequest. +type ListPlatformConfigurationsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // A filter to return only resources their lifecycleState matches the given lifecycleState. + LifecycleState PlatformConfigurationLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` + + // A filter to return only resources that match the entire display name given. + DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` + + // unique PlatformConfiguration identifier + Id *string `mandatory:"false" contributesTo:"query" name:"id"` + + // Config Category + ConfigCategory ConfigCategoryDetailsConfigCategoryEnum `mandatory:"false" contributesTo:"query" name:"configCategory" omitEmpty:"true"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListPlatformConfigurationsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. + SortBy ListPlatformConfigurationsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListPlatformConfigurationsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListPlatformConfigurationsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListPlatformConfigurationsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListPlatformConfigurationsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListPlatformConfigurationsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPlatformConfigurationLifecycleStateEnum(string(request.LifecycleState)); !ok && request.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", request.LifecycleState, strings.Join(GetPlatformConfigurationLifecycleStateEnumStringValues(), ","))) + } + if _, ok := GetMappingConfigCategoryDetailsConfigCategoryEnum(string(request.ConfigCategory)); !ok && request.ConfigCategory != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ConfigCategory: %s. Supported values are: %s.", request.ConfigCategory, strings.Join(GetConfigCategoryDetailsConfigCategoryEnumStringValues(), ","))) + } + if _, ok := GetMappingListPlatformConfigurationsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListPlatformConfigurationsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListPlatformConfigurationsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListPlatformConfigurationsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListPlatformConfigurationsResponse wrapper for the ListPlatformConfigurations operation +type ListPlatformConfigurationsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of PlatformConfigurationCollection instances + PlatformConfigurationCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListPlatformConfigurationsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListPlatformConfigurationsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListPlatformConfigurationsSortOrderEnum Enum with underlying type: string +type ListPlatformConfigurationsSortOrderEnum string + +// Set of constants representing the allowable values for ListPlatformConfigurationsSortOrderEnum +const ( + ListPlatformConfigurationsSortOrderAsc ListPlatformConfigurationsSortOrderEnum = "ASC" + ListPlatformConfigurationsSortOrderDesc ListPlatformConfigurationsSortOrderEnum = "DESC" +) + +var mappingListPlatformConfigurationsSortOrderEnum = map[string]ListPlatformConfigurationsSortOrderEnum{ + "ASC": ListPlatformConfigurationsSortOrderAsc, + "DESC": ListPlatformConfigurationsSortOrderDesc, +} + +var mappingListPlatformConfigurationsSortOrderEnumLowerCase = map[string]ListPlatformConfigurationsSortOrderEnum{ + "asc": ListPlatformConfigurationsSortOrderAsc, + "desc": ListPlatformConfigurationsSortOrderDesc, +} + +// GetListPlatformConfigurationsSortOrderEnumValues Enumerates the set of values for ListPlatformConfigurationsSortOrderEnum +func GetListPlatformConfigurationsSortOrderEnumValues() []ListPlatformConfigurationsSortOrderEnum { + values := make([]ListPlatformConfigurationsSortOrderEnum, 0) + for _, v := range mappingListPlatformConfigurationsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListPlatformConfigurationsSortOrderEnumStringValues Enumerates the set of values in String for ListPlatformConfigurationsSortOrderEnum +func GetListPlatformConfigurationsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListPlatformConfigurationsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPlatformConfigurationsSortOrderEnum(val string) (ListPlatformConfigurationsSortOrderEnum, bool) { + enum, ok := mappingListPlatformConfigurationsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListPlatformConfigurationsSortByEnum Enum with underlying type: string +type ListPlatformConfigurationsSortByEnum string + +// Set of constants representing the allowable values for ListPlatformConfigurationsSortByEnum +const ( + ListPlatformConfigurationsSortByTimecreated ListPlatformConfigurationsSortByEnum = "timeCreated" + ListPlatformConfigurationsSortByDisplayname ListPlatformConfigurationsSortByEnum = "displayName" +) + +var mappingListPlatformConfigurationsSortByEnum = map[string]ListPlatformConfigurationsSortByEnum{ + "timeCreated": ListPlatformConfigurationsSortByTimecreated, + "displayName": ListPlatformConfigurationsSortByDisplayname, +} + +var mappingListPlatformConfigurationsSortByEnumLowerCase = map[string]ListPlatformConfigurationsSortByEnum{ + "timecreated": ListPlatformConfigurationsSortByTimecreated, + "displayname": ListPlatformConfigurationsSortByDisplayname, +} + +// GetListPlatformConfigurationsSortByEnumValues Enumerates the set of values for ListPlatformConfigurationsSortByEnum +func GetListPlatformConfigurationsSortByEnumValues() []ListPlatformConfigurationsSortByEnum { + values := make([]ListPlatformConfigurationsSortByEnum, 0) + for _, v := range mappingListPlatformConfigurationsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListPlatformConfigurationsSortByEnumStringValues Enumerates the set of values in String for ListPlatformConfigurationsSortByEnum +func GetListPlatformConfigurationsSortByEnumStringValues() []string { + return []string{ + "timeCreated", + "displayName", + } +} + +// GetMappingListPlatformConfigurationsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListPlatformConfigurationsSortByEnum(val string) (ListPlatformConfigurationsSortByEnum, bool) { + enum, ok := mappingListPlatformConfigurationsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_properties_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_properties_request_response.go index 0d84cd27f3f..87772d81086 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_properties_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_properties_request_response.go @@ -21,16 +21,16 @@ type ListPropertiesRequest struct { // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState PropertyLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // unique Property identifier + // A filter to return only resources whose Property identifier matches the given identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` - // A filter to return only resources their scope matches the given lifecycleState. + // A filter to return only resources their scope matches the given scope. Scope ListPropertiesScopeEnum `mandatory:"false" contributesTo:"query" name:"scope" omitEmpty:"true"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_resources_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_resources_request_response.go new file mode 100644 index 00000000000..c19544f9161 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_resources_request_response.go @@ -0,0 +1,208 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListResourcesRequest wrapper for the ListResources operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListResources.go.html to see an example of how to use ListResourcesRequest. +type ListResourcesRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // unique jobActivity identifier + JobActivityId *string `mandatory:"true" contributesTo:"path" name:"jobActivityId"` + + // Task Id + ResourceTaskId *string `mandatory:"false" contributesTo:"query" name:"resourceTaskId"` + + // Unique step name + StepName *string `mandatory:"false" contributesTo:"query" name:"stepName"` + + // Unique target name + TargetName *string `mandatory:"false" contributesTo:"query" name:"targetName"` + + // Task Order Sequence + Sequence *string `mandatory:"false" contributesTo:"query" name:"sequence"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListResourcesSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + SortBy ListResourcesSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListResourcesRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListResourcesRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListResourcesRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListResourcesRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListResourcesRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListResourcesSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListResourcesSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListResourcesSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListResourcesSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListResourcesResponse wrapper for the ListResources operation +type ListResourcesResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ResourceCollection instances + ResourceCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListResourcesResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListResourcesResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListResourcesSortOrderEnum Enum with underlying type: string +type ListResourcesSortOrderEnum string + +// Set of constants representing the allowable values for ListResourcesSortOrderEnum +const ( + ListResourcesSortOrderAsc ListResourcesSortOrderEnum = "ASC" + ListResourcesSortOrderDesc ListResourcesSortOrderEnum = "DESC" +) + +var mappingListResourcesSortOrderEnum = map[string]ListResourcesSortOrderEnum{ + "ASC": ListResourcesSortOrderAsc, + "DESC": ListResourcesSortOrderDesc, +} + +var mappingListResourcesSortOrderEnumLowerCase = map[string]ListResourcesSortOrderEnum{ + "asc": ListResourcesSortOrderAsc, + "desc": ListResourcesSortOrderDesc, +} + +// GetListResourcesSortOrderEnumValues Enumerates the set of values for ListResourcesSortOrderEnum +func GetListResourcesSortOrderEnumValues() []ListResourcesSortOrderEnum { + values := make([]ListResourcesSortOrderEnum, 0) + for _, v := range mappingListResourcesSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListResourcesSortOrderEnumStringValues Enumerates the set of values in String for ListResourcesSortOrderEnum +func GetListResourcesSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListResourcesSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListResourcesSortOrderEnum(val string) (ListResourcesSortOrderEnum, bool) { + enum, ok := mappingListResourcesSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListResourcesSortByEnum Enum with underlying type: string +type ListResourcesSortByEnum string + +// Set of constants representing the allowable values for ListResourcesSortByEnum +const ( + ListResourcesSortByTimestarted ListResourcesSortByEnum = "timeStarted" +) + +var mappingListResourcesSortByEnum = map[string]ListResourcesSortByEnum{ + "timeStarted": ListResourcesSortByTimestarted, +} + +var mappingListResourcesSortByEnumLowerCase = map[string]ListResourcesSortByEnum{ + "timestarted": ListResourcesSortByTimestarted, +} + +// GetListResourcesSortByEnumValues Enumerates the set of values for ListResourcesSortByEnum +func GetListResourcesSortByEnumValues() []ListResourcesSortByEnum { + values := make([]ListResourcesSortByEnum, 0) + for _, v := range mappingListResourcesSortByEnum { + values = append(values, v) + } + return values +} + +// GetListResourcesSortByEnumStringValues Enumerates the set of values in String for ListResourcesSortByEnum +func GetListResourcesSortByEnumStringValues() []string { + return []string{ + "timeStarted", + } +} + +// GetMappingListResourcesSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListResourcesSortByEnum(val string) (ListResourcesSortByEnum, bool) { + enum, ok := mappingListResourcesSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_runbooks_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_runbooks_request_response.go index f34833eb9c2..561d299cbee 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_runbooks_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_runbooks_request_response.go @@ -21,25 +21,25 @@ type ListRunbooksRequest struct { // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState RunbookLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // unique Runbook identifier + // A filter to return runbooks whose identifier matches the given identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` - // The ID of the runbook type. + // A filter to return runbooks whose type matches the given type. Type RunbookTypeEnum `mandatory:"false" contributesTo:"query" name:"type" omitEmpty:"true"` - // The runbook relevance of product or full-stack. + // A filter to return runbooks whose runbookRelevance matches the given runbookRelevance. RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"false" contributesTo:"query" name:"runbookRelevance" omitEmpty:"true"` - // The ID of the runbook platform. + // A filter to return runbooks whose platform matches the given platform. Platform *string `mandatory:"false" contributesTo:"query" name:"platform"` - // The runbook lifecycle. + // A filter to return runbooks whose operation matches the given lifecycle operation. Operation *string `mandatory:"false" contributesTo:"query" name:"operation"` // The maximum number of items to return. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_definitions_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_definitions_request_response.go index 9f5587f9c08..2940abc3cb0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_definitions_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_definitions_request_response.go @@ -21,21 +21,24 @@ type ListSchedulerDefinitionsRequest struct { // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only scheduleDefinitions whose lifecycleState matches the given lifecycleState. LifecycleState SchedulerDefinitionLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` - // A filter to return only Scheduler Definitions whose assocaited product matches the given product + // A filter to return only dchedule definitions whose assocaited product matches the given product Product *string `mandatory:"false" contributesTo:"query" name:"product"` - // unique SchedulerDefinition identifier + // A filter to return only schedule definitions whose identifier matches the given identifier. Id *string `mandatory:"false" contributesTo:"query" name:"id"` - // unique MaintenanceWindow identifier + // A filter to return only schedule definitions whose associated maintenanceWindowId matches the given maintenanceWindowId. MaintenanceWindowId *string `mandatory:"false" contributesTo:"query" name:"maintenanceWindowId"` + // A filter to return only schedule definitions whose associated runbookId matches the given runbookId. + RunbookId *string `mandatory:"false" contributesTo:"query" name:"runbookId"` + // unique Fleet identifier FleetId *string `mandatory:"false" contributesTo:"query" name:"fleetId"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_jobs_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_jobs_request_response.go index f07cd84c04d..b2cfb14744d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_jobs_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_scheduler_jobs_request_response.go @@ -21,7 +21,7 @@ type ListSchedulerJobsRequest struct { // The ID of the compartment in which to list resources. CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` - // A filter to return only resources their lifecycleState matches the given lifecycleState. + // A filter to return only resources whose lifecycleState matches the given lifecycleState. LifecycleState SchedulerJobLifecycleStateEnum `mandatory:"false" contributesTo:"query" name:"lifecycleState" omitEmpty:"true"` // unique Fleet identifier @@ -36,6 +36,9 @@ type ListSchedulerJobsRequest struct { // Fetch next remediation Job IsRemediationJobNeeded *bool `mandatory:"false" contributesTo:"query" name:"isRemediationJobNeeded"` + // A filter to return only resources their subState matches the given subState. + SubState *string `mandatory:"false" contributesTo:"query" name:"subState"` + // A filter to return only resources that match the entire display name given. DisplayName *string `mandatory:"false" contributesTo:"query" name:"displayName"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_steps_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_steps_request_response.go new file mode 100644 index 00000000000..a8fe1f06dc5 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_steps_request_response.go @@ -0,0 +1,208 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ListStepsRequest wrapper for the ListSteps operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListSteps.go.html to see an example of how to use ListStepsRequest. +type ListStepsRequest struct { + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // unique jobActivity identifier + JobActivityId *string `mandatory:"true" contributesTo:"path" name:"jobActivityId"` + + // Task Id + ResourceTaskId *string `mandatory:"false" contributesTo:"query" name:"resourceTaskId"` + + // Unique step name + StepName *string `mandatory:"false" contributesTo:"query" name:"stepName"` + + // Unique target name + TargetName *string `mandatory:"false" contributesTo:"query" name:"targetName"` + + // Task Order Sequence + Sequence *string `mandatory:"false" contributesTo:"query" name:"sequence"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder ListStepsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // The field to sort by. Only one sort order may be provided. Default order for timeStarted is descending. + SortBy ListStepsSortByEnum `mandatory:"false" contributesTo:"query" name:"sortBy" omitEmpty:"true"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ListStepsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ListStepsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ListStepsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ListStepsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ListStepsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingListStepsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetListStepsSortOrderEnumStringValues(), ","))) + } + if _, ok := GetMappingListStepsSortByEnum(string(request.SortBy)); !ok && request.SortBy != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortBy: %s. Supported values are: %s.", request.SortBy, strings.Join(GetListStepsSortByEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ListStepsResponse wrapper for the ListSteps operation +type ListStepsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of StepCollection instances + StepCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response ListStepsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ListStepsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// ListStepsSortOrderEnum Enum with underlying type: string +type ListStepsSortOrderEnum string + +// Set of constants representing the allowable values for ListStepsSortOrderEnum +const ( + ListStepsSortOrderAsc ListStepsSortOrderEnum = "ASC" + ListStepsSortOrderDesc ListStepsSortOrderEnum = "DESC" +) + +var mappingListStepsSortOrderEnum = map[string]ListStepsSortOrderEnum{ + "ASC": ListStepsSortOrderAsc, + "DESC": ListStepsSortOrderDesc, +} + +var mappingListStepsSortOrderEnumLowerCase = map[string]ListStepsSortOrderEnum{ + "asc": ListStepsSortOrderAsc, + "desc": ListStepsSortOrderDesc, +} + +// GetListStepsSortOrderEnumValues Enumerates the set of values for ListStepsSortOrderEnum +func GetListStepsSortOrderEnumValues() []ListStepsSortOrderEnum { + values := make([]ListStepsSortOrderEnum, 0) + for _, v := range mappingListStepsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetListStepsSortOrderEnumStringValues Enumerates the set of values in String for ListStepsSortOrderEnum +func GetListStepsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingListStepsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListStepsSortOrderEnum(val string) (ListStepsSortOrderEnum, bool) { + enum, ok := mappingListStepsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// ListStepsSortByEnum Enum with underlying type: string +type ListStepsSortByEnum string + +// Set of constants representing the allowable values for ListStepsSortByEnum +const ( + ListStepsSortByTimestarted ListStepsSortByEnum = "timeStarted" +) + +var mappingListStepsSortByEnum = map[string]ListStepsSortByEnum{ + "timeStarted": ListStepsSortByTimestarted, +} + +var mappingListStepsSortByEnumLowerCase = map[string]ListStepsSortByEnum{ + "timestarted": ListStepsSortByTimestarted, +} + +// GetListStepsSortByEnumValues Enumerates the set of values for ListStepsSortByEnum +func GetListStepsSortByEnumValues() []ListStepsSortByEnum { + values := make([]ListStepsSortByEnum, 0) + for _, v := range mappingListStepsSortByEnum { + values = append(values, v) + } + return values +} + +// GetListStepsSortByEnumStringValues Enumerates the set of values in String for ListStepsSortByEnum +func GetListStepsSortByEnumStringValues() []string { + return []string{ + "timeStarted", + } +} + +// GetMappingListStepsSortByEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingListStepsSortByEnum(val string) (ListStepsSortByEnum, bool) { + enum, ok := mappingListStepsSortByEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_targets_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_targets_request_response.go index 40fb5016d50..af623049c66 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_targets_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/list_targets_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ListTargets.go.html to see an example of how to use ListTargetsRequest. type ListTargetsRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A filter to return only resources that match the entire display name given. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window.go index bed1d520f5f..04cb8993499 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// MaintenanceWindow Details of Maintenance Window. +// MaintenanceWindow Details of Maintenance Window in Fleet Application Management. type MaintenanceWindow struct { // The OCID of the resource. @@ -34,15 +33,18 @@ type MaintenanceWindow struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` // Does the maintenenace window cause outage? + // An outage indicates whether a maintenance window can consider operations that require downtime. + // It means a period when the application is not accessible. IsOutage *bool `mandatory:"true" json:"isOutage"` - // Duration if schedule type is Custom + // Duration of the maintenance window. + // Specify how long the maintenance window remains open. Duration *string `mandatory:"true" json:"duration"` - // Is this is a recurring maintenance window + // Is this a recurring maintenance window? IsRecurring *bool `mandatory:"true" json:"isRecurring"` - // Task initiation cutoff + // Task initiation cutoff time for the maintenance window. TaskInitiationCutoff *int `mandatory:"true" json:"taskInitiationCutoff"` // The current state of the MaintenanceWindow. @@ -69,10 +71,11 @@ type MaintenanceWindow struct { // Type of the MaintenanceWindow. MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` - // Start time of schedule + // Specify the date and time of the day that the maintenance window starts. TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` - // Recurrence rule specification if recurring + // Recurrence rule specification if maintenance window recurring. + // Specify the frequency of running the maintenance window. Recurrences *string `mandatory:"false" json:"recurrences"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_collection.go index 95e26c32731..9841eb5197c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// MaintenanceWindowCollection Results of a maintenanceWindow search. Contains boh MaintenanceWindowSummary items and other information, such as metadata. +// MaintenanceWindowCollection Results of a maintenanceWindow search. Contains both MaintenanceWindowSummary items and other information, such as metadata. type MaintenanceWindowCollection struct { // List of maintenanceWindows. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_summary.go index 8e2eb84c0d2..5067059fa07 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -34,15 +33,18 @@ type MaintenanceWindowSummary struct { TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` // Does the maintenenace window cause outage? + // An outage indicates whether a maintenance window can consider operations that require downtime. + // It means a period when the application is not accessible. IsOutage *bool `mandatory:"true" json:"isOutage"` - // Duration if schedule type is Custom + // Duration of the maintenance window. + // Specify how long the maintenance window remains open. Duration *string `mandatory:"true" json:"duration"` - // Is this is a recurring maintenance window + // Is this a recurring maintenance window? IsRecurring *bool `mandatory:"true" json:"isRecurring"` - // Task initiation cutoff + // Task initiation cutoff time for the maintenance window. TaskInitiationCutoff *int `mandatory:"true" json:"taskInitiationCutoff"` // The current state of the MaintenanceWindow. @@ -69,10 +71,11 @@ type MaintenanceWindowSummary struct { // Type of the MaintenanceWindow. MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` - // Start time of schedule + // Specify the date and time of the day that the maintenance window starts. TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` - // Recurrence rule specification if recurring + // Recurrence rule specification if maintenance window recurring. + // Specify the frequency of running the maintenance window. Recurrences *string `mandatory:"false" json:"recurrences"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_type.go index c232fc0679b..0d9ca2c74c6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/maintenance_window_type.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_details.go new file mode 100644 index 00000000000..b02c2581208 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_details.go @@ -0,0 +1,62 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManageJobExecutionDetails Details of the Job Execution actions. +type ManageJobExecutionDetails struct { + ActionDetails UserActionDetails `mandatory:"true" json:"actionDetails"` +} + +func (m ManageJobExecutionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManageJobExecutionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *ManageJobExecutionDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + ActionDetails useractiondetails `json:"actionDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.ActionDetails.UnmarshalPolymorphicJSON(model.ActionDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ActionDetails = nn.(UserActionDetails) + } else { + m.ActionDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_request_response.go new file mode 100644 index 00000000000..a76566cd4bc --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_job_execution_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ManageJobExecutionRequest wrapper for the ManageJobExecution operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ManageJobExecution.go.html to see an example of how to use ManageJobExecutionRequest. +type ManageJobExecutionRequest struct { + + // Details for confirming Targets. + ManageJobExecutionDetails `contributesTo:"body"` + + // unique SchedulerJob identifier + SchedulerJobId *string `mandatory:"true" contributesTo:"path" name:"schedulerJobId"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ManageJobExecutionRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ManageJobExecutionRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ManageJobExecutionRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ManageJobExecutionRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ManageJobExecutionRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ManageJobExecutionResponse wrapper for the ManageJobExecution operation +type ManageJobExecutionResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ManageJobExecutionResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ManageJobExecutionResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_details.go new file mode 100644 index 00000000000..5a2ddd27e9d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManageSettingsDetails The information to be updated. +type ManageSettingsDetails struct { + + // Provide discovery frequency. + DiscoveryFrequency *string `mandatory:"false" json:"discoveryFrequency"` +} + +func (m ManageSettingsDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManageSettingsDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_request_response.go new file mode 100644 index 00000000000..37129f5a2d7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/manage_settings_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// ManageSettingsRequest wrapper for the ManageSettings operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/ManageSettings.go.html to see an example of how to use ManageSettingsRequest. +type ManageSettingsRequest struct { + + // A filter to return resources whose Onboarding identifier matches the given identifier. + OnboardingId *string `mandatory:"true" contributesTo:"path" name:"onboardingId"` + + // The information to be updated. + ManageSettingsDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request ManageSettingsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request ManageSettingsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request ManageSettingsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request ManageSettingsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request ManageSettingsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ManageSettingsResponse wrapper for the ManageSettings operation +type ManageSettingsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response ManageSettingsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response ManageSettingsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity.go new file mode 100644 index 00000000000..2e01d687282 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "strings" +) + +// ManagedEntityEnum Enum with underlying type: string +type ManagedEntityEnum string + +// Set of constants representing the allowable values for ManagedEntityEnum +const ( + ManagedEntityResource ManagedEntityEnum = "RESOURCE" + ManagedEntityTarget ManagedEntityEnum = "TARGET" +) + +var mappingManagedEntityEnum = map[string]ManagedEntityEnum{ + "RESOURCE": ManagedEntityResource, + "TARGET": ManagedEntityTarget, +} + +var mappingManagedEntityEnumLowerCase = map[string]ManagedEntityEnum{ + "resource": ManagedEntityResource, + "target": ManagedEntityTarget, +} + +// GetManagedEntityEnumValues Enumerates the set of values for ManagedEntityEnum +func GetManagedEntityEnumValues() []ManagedEntityEnum { + values := make([]ManagedEntityEnum, 0) + for _, v := range mappingManagedEntityEnum { + values = append(values, v) + } + return values +} + +// GetManagedEntityEnumStringValues Enumerates the set of values in String for ManagedEntityEnum +func GetManagedEntityEnumStringValues() []string { + return []string{ + "RESOURCE", + "TARGET", + } +} + +// GetMappingManagedEntityEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingManagedEntityEnum(val string) (ManagedEntityEnum, bool) { + enum, ok := mappingManagedEntityEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation.go new file mode 100644 index 00000000000..86762649066 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManagedEntityAggregation Aggregated summary information for ManagedEntity +type ManagedEntityAggregation struct { + + // count of Managed Entities in a Tenancy. + Count *int `mandatory:"true" json:"count"` + + Dimensions *ManagedEntityDimension `mandatory:"true" json:"dimensions"` +} + +func (m ManagedEntityAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManagedEntityAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation_collection.go new file mode 100644 index 00000000000..2c0cba792a4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_aggregation_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManagedEntityAggregationCollection An array of Managed Entity objects +type ManagedEntityAggregationCollection struct { + + // List of ManagedEntityAggregation objects. + Items []ManagedEntityAggregation `mandatory:"true" json:"items"` +} + +func (m ManagedEntityAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManagedEntityAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_dimension.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_dimension.go new file mode 100644 index 00000000000..1367be6f069 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/managed_entity_dimension.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ManagedEntityDimension Aggregated summary information for ComplianceRecord +type ManagedEntityDimension struct { + + // Level at which the compliance is calculated. + Entity ManagedEntityEnum `mandatory:"true" json:"entity"` +} + +func (m ManagedEntityDimension) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ManagedEntityDimension) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingManagedEntityEnum(string(m.Entity)); !ok && m.Entity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Entity: %s. Supported values are: %s.", m.Entity, strings.Join(GetManagedEntityEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/notification_preferences.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/notification_preferences.go index 0fb3b638df1..b386e1c102d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/notification_preferences.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/notification_preferences.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,13 +15,14 @@ import ( "strings" ) -// NotificationPreferences Conditions when met to send notifications on the fleet activities +// NotificationPreferences Notification information to get notified when the fleet status changes. type NotificationPreferences struct { - // Topic Id where the notifications will be directed + // Topic Id where the notifications will be directed. + // A topic is a communication channel for sending messages on chosen events to subscriptions. TopicId *string `mandatory:"true" json:"topicId"` - // Copartment Id of the topic where the notifications will be directed + // Compartment ID the topic belongs to. CompartmentId *string `mandatory:"true" json:"compartmentId"` Preferences *Preferences `mandatory:"false" json:"preferences"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/object_storage_bucket_content_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/object_storage_bucket_content_details.go index 66ca9b97cd3..f402648b9f0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/object_storage_bucket_content_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/object_storage_bucket_content_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -18,7 +17,7 @@ import ( ) // ObjectStorageBucketContentDetails Details about Object Storage Bucket source. -// Restricted to the region this is called +// Restricted to the region this is called. type ObjectStorageBucketContentDetails struct { // Namespace. @@ -30,7 +29,7 @@ type ObjectStorageBucketContentDetails struct { // Object Name. ObjectName *string `mandatory:"true" json:"objectName"` - // SHA256 checksum of the artifact. + // md5 checksum of the artifact. Checksum *string `mandatory:"true" json:"checksum"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding.go index a34305daa4c..035bb7b9b60 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,8 @@ import ( "strings" ) -// Onboarding FleetAppManagementService onboarding resource. +// Onboarding Fleet Application Management onboarding resource. +// The onboarding process lets Fleet Application Management create a few required policies that you need to start using it and its features. type Onboarding struct { // The unique id of the resource. @@ -37,15 +37,22 @@ type Onboarding struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // A value determining FAMS tag is enabled or not + // A value determining if the Fleet Application Management tagging is enabled or not. + // Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. IsFamsTagEnabled *bool `mandatory:"false" json:"isFamsTagEnabled"` - // Version of FAMS the tenant is onboarded to. + // The version of Fleet Application Management that the tenant is onboarded to. Version *string `mandatory:"false" json:"version"` - // A value determining if cost tracking tag is enabled or not + // A value determining if the cost tracking tag is enabled or not. + // Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. IsCostTrackingTagEnabled *bool `mandatory:"false" json:"isCostTrackingTagEnabled"` + AppliedPolicies *OnboardingPolicySummary `mandatory:"false" json:"appliedPolicies"` + + // Provide discovery frequency. + DiscoveryFrequency *string `mandatory:"false" json:"discoveryFrequency"` + // System tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_collection.go index 509d1a9e2a8..178df2b7bcc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// OnboardingCollection List of FleetAppManagementService Onboardings. +// OnboardingCollection List of Fleet Application Management Onboardings. type OnboardingCollection struct { - // List of FleetAppManagementService Onboardings. + // List of Fleet Application Management Onboardings. Items []OnboardingSummary `mandatory:"true" json:"items"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_collection.go index 40c8f668f50..5481db00a9a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// OnboardingPolicyCollection List of FleetAppManagementService Onboard policies. +// OnboardingPolicyCollection List of Fleet Application Management Onboard policies. type OnboardingPolicyCollection struct { - // List of FleetAppManagementService Onboard policies. + // List of Fleet Application Management Onboard policies. Items []OnboardingPolicySummary `mandatory:"true" json:"items"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_summary.go index f16214219c0..a29f0f2422d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_policy_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// OnboardingPolicySummary Summary of the FleetAppManagementService Onboard Policy. +// OnboardingPolicySummary Summary of the Fleet Application Management Onboard Policy. type OnboardingPolicySummary struct { // The unique id of the resource. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_summary.go index 7bcdc6cf64b..177bf1ad4bb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/onboarding_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// OnboardingSummary Summary of the FleetAppManagementService Onboarding. +// OnboardingSummary Summary of the Fleet Application Management Onboarding. type OnboardingSummary struct { // The unique id of the resource. @@ -37,15 +36,22 @@ type OnboardingSummary struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // A value determining FAMS tag is enabled or not + // A value determining if the Fleet Application Management tagging is enabled or not. + // Allow Fleet Application Management to tag resources with fleet name using "Oracle$FAMS-Tags.FleetName" tag. IsFamsTagEnabled *bool `mandatory:"false" json:"isFamsTagEnabled"` - // Version of FAMS the tenant is onboarded to. + // The version of Fleet Application Management that the tenant is onboarded to. Version *string `mandatory:"false" json:"version"` - // A value determining if cost tracking tag is enabled or not + // A value determining if the cost tracking tag is enabled or not. + // Allow Fleet Application Management to tag resources with cost tracking tag using "Oracle$FAMS-Tags.FAMSManaged" tag. IsCostTrackingTagEnabled *bool `mandatory:"false" json:"isCostTrackingTagEnabled"` + AppliedPolicies *OnboardingPolicySummary `mandatory:"false" json:"appliedPolicies"` + + // Provide discovery frequency. + DiscoveryFrequency *string `mandatory:"false" json:"discoveryFrequency"` + // System tags for this resource. Each key is predefined and scoped to a namespace. // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_runbook.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_runbook.go index 800592b1127..f743a9ad349 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_runbook.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_runbook.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_status.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_status.go index e5153ddd588..317597b31aa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_status.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_status.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_type.go index 716c5eab78c..5d2eb312e41 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/operation_type.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -19,66 +18,114 @@ type OperationTypeEnum string // Set of constants representing the allowable values for OperationTypeEnum const ( - OperationTypeCreateFleet OperationTypeEnum = "CREATE_FLEET" - OperationTypeUpdateFleet OperationTypeEnum = "UPDATE_FLEET" - OperationTypeDeleteFleet OperationTypeEnum = "DELETE_FLEET" - OperationTypeConfirmTarget OperationTypeEnum = "CONFIRM_TARGET" - OperationTypeGenerateCompliance OperationTypeEnum = "GENERATE_COMPLIANCE" - OperationTypeRequestTargetDiscovery OperationTypeEnum = "REQUEST_TARGET_DISCOVERY" - OperationTypeValidateResource OperationTypeEnum = "VALIDATE_RESOURCE" - OperationTypeCreateCredential OperationTypeEnum = "CREATE_CREDENTIAL" - OperationTypeUpdateCredential OperationTypeEnum = "UPDATE_CREDENTIAL" - OperationTypeDeleteCredential OperationTypeEnum = "DELETE_CREDENTIAL" - OperationTypeCreateSchedule OperationTypeEnum = "CREATE_SCHEDULE" - OperationTypeUpdateSchedule OperationTypeEnum = "UPDATE_SCHEDULE" - OperationTypeUpdateMaintenanceWindow OperationTypeEnum = "UPDATE_MAINTENANCE_WINDOW" - OperationTypeDeleteMaintenanceWindow OperationTypeEnum = "DELETE_MAINTENANCE_WINDOW" - OperationTypeCreateFleetResource OperationTypeEnum = "CREATE_FLEET_RESOURCE" - OperationTypeUpdateFleetResource OperationTypeEnum = "UPDATE_FLEET_RESOURCE" - OperationTypeDeleteFleetResource OperationTypeEnum = "DELETE_FLEET_RESOURCE" - OperationTypeCreateFamsOnboarding OperationTypeEnum = "CREATE_FAMS_ONBOARDING" + OperationTypeCreateFleet OperationTypeEnum = "CREATE_FLEET" + OperationTypeUpdateFleet OperationTypeEnum = "UPDATE_FLEET" + OperationTypeDeleteFleet OperationTypeEnum = "DELETE_FLEET" + OperationTypeConfirmTarget OperationTypeEnum = "CONFIRM_TARGET" + OperationTypeGenerateCompliance OperationTypeEnum = "GENERATE_COMPLIANCE" + OperationTypeRequestTargetDiscovery OperationTypeEnum = "REQUEST_TARGET_DISCOVERY" + OperationTypeValidateResource OperationTypeEnum = "VALIDATE_RESOURCE" + OperationTypeCreateCredential OperationTypeEnum = "CREATE_CREDENTIAL" + OperationTypeUpdateCredential OperationTypeEnum = "UPDATE_CREDENTIAL" + OperationTypeDeleteCredential OperationTypeEnum = "DELETE_CREDENTIAL" + OperationTypeCreateSchedule OperationTypeEnum = "CREATE_SCHEDULE" + OperationTypeUpdateSchedule OperationTypeEnum = "UPDATE_SCHEDULE" + OperationTypeUpdateMaintenanceWindow OperationTypeEnum = "UPDATE_MAINTENANCE_WINDOW" + OperationTypeDeleteMaintenanceWindow OperationTypeEnum = "DELETE_MAINTENANCE_WINDOW" + OperationTypeCreateFleetResource OperationTypeEnum = "CREATE_FLEET_RESOURCE" + OperationTypeUpdateFleetResource OperationTypeEnum = "UPDATE_FLEET_RESOURCE" + OperationTypeDeleteFleetResource OperationTypeEnum = "DELETE_FLEET_RESOURCE" + OperationTypeCreateFamsOnboarding OperationTypeEnum = "CREATE_FAMS_ONBOARDING" + OperationTypeCreateRunbook OperationTypeEnum = "CREATE_RUNBOOK" + OperationTypeUpdateRunbook OperationTypeEnum = "UPDATE_RUNBOOK" + OperationTypeDeleteRunbook OperationTypeEnum = "DELETE_RUNBOOK" + OperationTypePublishRunbook OperationTypeEnum = "PUBLISH_RUNBOOK" + OperationTypeUpdateTask OperationTypeEnum = "UPDATE_TASK" + OperationTypeDeleteTask OperationTypeEnum = "DELETE_TASK" + OperationTypeUpdateFamsOnboarding OperationTypeEnum = "UPDATE_FAMS_ONBOARDING" + OperationTypeDeleteFamsOnboarding OperationTypeEnum = "DELETE_FAMS_ONBOARDING" + OperationTypeCreateCompliancePolicyRule OperationTypeEnum = "CREATE_COMPLIANCE_POLICY_RULE" + OperationTypeUpdateCompliancePolicyRule OperationTypeEnum = "UPDATE_COMPLIANCE_POLICY_RULE" + OperationTypeDeleteCompliancePolicyRule OperationTypeEnum = "DELETE_COMPLIANCE_POLICY_RULE" + OperationTypeUpdatePatch OperationTypeEnum = "UPDATE_PATCH" + OperationTypeDeletePatch OperationTypeEnum = "DELETE_PATCH" + OperationTypeManageJobExecution OperationTypeEnum = "MANAGE_JOB_EXECUTION" + OperationTypeDeletePlatformConfiguration OperationTypeEnum = "DELETE_PLATFORM_CONFIGURATION" + OperationTypeUpdatePlatformConfiguration OperationTypeEnum = "UPDATE_PLATFORM_CONFIGURATION" ) var mappingOperationTypeEnum = map[string]OperationTypeEnum{ - "CREATE_FLEET": OperationTypeCreateFleet, - "UPDATE_FLEET": OperationTypeUpdateFleet, - "DELETE_FLEET": OperationTypeDeleteFleet, - "CONFIRM_TARGET": OperationTypeConfirmTarget, - "GENERATE_COMPLIANCE": OperationTypeGenerateCompliance, - "REQUEST_TARGET_DISCOVERY": OperationTypeRequestTargetDiscovery, - "VALIDATE_RESOURCE": OperationTypeValidateResource, - "CREATE_CREDENTIAL": OperationTypeCreateCredential, - "UPDATE_CREDENTIAL": OperationTypeUpdateCredential, - "DELETE_CREDENTIAL": OperationTypeDeleteCredential, - "CREATE_SCHEDULE": OperationTypeCreateSchedule, - "UPDATE_SCHEDULE": OperationTypeUpdateSchedule, - "UPDATE_MAINTENANCE_WINDOW": OperationTypeUpdateMaintenanceWindow, - "DELETE_MAINTENANCE_WINDOW": OperationTypeDeleteMaintenanceWindow, - "CREATE_FLEET_RESOURCE": OperationTypeCreateFleetResource, - "UPDATE_FLEET_RESOURCE": OperationTypeUpdateFleetResource, - "DELETE_FLEET_RESOURCE": OperationTypeDeleteFleetResource, - "CREATE_FAMS_ONBOARDING": OperationTypeCreateFamsOnboarding, + "CREATE_FLEET": OperationTypeCreateFleet, + "UPDATE_FLEET": OperationTypeUpdateFleet, + "DELETE_FLEET": OperationTypeDeleteFleet, + "CONFIRM_TARGET": OperationTypeConfirmTarget, + "GENERATE_COMPLIANCE": OperationTypeGenerateCompliance, + "REQUEST_TARGET_DISCOVERY": OperationTypeRequestTargetDiscovery, + "VALIDATE_RESOURCE": OperationTypeValidateResource, + "CREATE_CREDENTIAL": OperationTypeCreateCredential, + "UPDATE_CREDENTIAL": OperationTypeUpdateCredential, + "DELETE_CREDENTIAL": OperationTypeDeleteCredential, + "CREATE_SCHEDULE": OperationTypeCreateSchedule, + "UPDATE_SCHEDULE": OperationTypeUpdateSchedule, + "UPDATE_MAINTENANCE_WINDOW": OperationTypeUpdateMaintenanceWindow, + "DELETE_MAINTENANCE_WINDOW": OperationTypeDeleteMaintenanceWindow, + "CREATE_FLEET_RESOURCE": OperationTypeCreateFleetResource, + "UPDATE_FLEET_RESOURCE": OperationTypeUpdateFleetResource, + "DELETE_FLEET_RESOURCE": OperationTypeDeleteFleetResource, + "CREATE_FAMS_ONBOARDING": OperationTypeCreateFamsOnboarding, + "CREATE_RUNBOOK": OperationTypeCreateRunbook, + "UPDATE_RUNBOOK": OperationTypeUpdateRunbook, + "DELETE_RUNBOOK": OperationTypeDeleteRunbook, + "PUBLISH_RUNBOOK": OperationTypePublishRunbook, + "UPDATE_TASK": OperationTypeUpdateTask, + "DELETE_TASK": OperationTypeDeleteTask, + "UPDATE_FAMS_ONBOARDING": OperationTypeUpdateFamsOnboarding, + "DELETE_FAMS_ONBOARDING": OperationTypeDeleteFamsOnboarding, + "CREATE_COMPLIANCE_POLICY_RULE": OperationTypeCreateCompliancePolicyRule, + "UPDATE_COMPLIANCE_POLICY_RULE": OperationTypeUpdateCompliancePolicyRule, + "DELETE_COMPLIANCE_POLICY_RULE": OperationTypeDeleteCompliancePolicyRule, + "UPDATE_PATCH": OperationTypeUpdatePatch, + "DELETE_PATCH": OperationTypeDeletePatch, + "MANAGE_JOB_EXECUTION": OperationTypeManageJobExecution, + "DELETE_PLATFORM_CONFIGURATION": OperationTypeDeletePlatformConfiguration, + "UPDATE_PLATFORM_CONFIGURATION": OperationTypeUpdatePlatformConfiguration, } var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{ - "create_fleet": OperationTypeCreateFleet, - "update_fleet": OperationTypeUpdateFleet, - "delete_fleet": OperationTypeDeleteFleet, - "confirm_target": OperationTypeConfirmTarget, - "generate_compliance": OperationTypeGenerateCompliance, - "request_target_discovery": OperationTypeRequestTargetDiscovery, - "validate_resource": OperationTypeValidateResource, - "create_credential": OperationTypeCreateCredential, - "update_credential": OperationTypeUpdateCredential, - "delete_credential": OperationTypeDeleteCredential, - "create_schedule": OperationTypeCreateSchedule, - "update_schedule": OperationTypeUpdateSchedule, - "update_maintenance_window": OperationTypeUpdateMaintenanceWindow, - "delete_maintenance_window": OperationTypeDeleteMaintenanceWindow, - "create_fleet_resource": OperationTypeCreateFleetResource, - "update_fleet_resource": OperationTypeUpdateFleetResource, - "delete_fleet_resource": OperationTypeDeleteFleetResource, - "create_fams_onboarding": OperationTypeCreateFamsOnboarding, + "create_fleet": OperationTypeCreateFleet, + "update_fleet": OperationTypeUpdateFleet, + "delete_fleet": OperationTypeDeleteFleet, + "confirm_target": OperationTypeConfirmTarget, + "generate_compliance": OperationTypeGenerateCompliance, + "request_target_discovery": OperationTypeRequestTargetDiscovery, + "validate_resource": OperationTypeValidateResource, + "create_credential": OperationTypeCreateCredential, + "update_credential": OperationTypeUpdateCredential, + "delete_credential": OperationTypeDeleteCredential, + "create_schedule": OperationTypeCreateSchedule, + "update_schedule": OperationTypeUpdateSchedule, + "update_maintenance_window": OperationTypeUpdateMaintenanceWindow, + "delete_maintenance_window": OperationTypeDeleteMaintenanceWindow, + "create_fleet_resource": OperationTypeCreateFleetResource, + "update_fleet_resource": OperationTypeUpdateFleetResource, + "delete_fleet_resource": OperationTypeDeleteFleetResource, + "create_fams_onboarding": OperationTypeCreateFamsOnboarding, + "create_runbook": OperationTypeCreateRunbook, + "update_runbook": OperationTypeUpdateRunbook, + "delete_runbook": OperationTypeDeleteRunbook, + "publish_runbook": OperationTypePublishRunbook, + "update_task": OperationTypeUpdateTask, + "delete_task": OperationTypeDeleteTask, + "update_fams_onboarding": OperationTypeUpdateFamsOnboarding, + "delete_fams_onboarding": OperationTypeDeleteFamsOnboarding, + "create_compliance_policy_rule": OperationTypeCreateCompliancePolicyRule, + "update_compliance_policy_rule": OperationTypeUpdateCompliancePolicyRule, + "delete_compliance_policy_rule": OperationTypeDeleteCompliancePolicyRule, + "update_patch": OperationTypeUpdatePatch, + "delete_patch": OperationTypeDeletePatch, + "manage_job_execution": OperationTypeManageJobExecution, + "delete_platform_configuration": OperationTypeDeletePlatformConfiguration, + "update_platform_configuration": OperationTypeUpdatePlatformConfiguration, } // GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum @@ -111,6 +158,22 @@ func GetOperationTypeEnumStringValues() []string { "UPDATE_FLEET_RESOURCE", "DELETE_FLEET_RESOURCE", "CREATE_FAMS_ONBOARDING", + "CREATE_RUNBOOK", + "UPDATE_RUNBOOK", + "DELETE_RUNBOOK", + "PUBLISH_RUNBOOK", + "UPDATE_TASK", + "DELETE_TASK", + "UPDATE_FAMS_ONBOARDING", + "DELETE_FAMS_ONBOARDING", + "CREATE_COMPLIANCE_POLICY_RULE", + "UPDATE_COMPLIANCE_POLICY_RULE", + "DELETE_COMPLIANCE_POLICY_RULE", + "UPDATE_PATCH", + "DELETE_PATCH", + "MANAGE_JOB_EXECUTION", + "DELETE_PLATFORM_CONFIGURATION", + "UPDATE_PLATFORM_CONFIGURATION", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/os_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/os_type.go index 0f9e0307627..275401adb33 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/os_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/os_type.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/outcome.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/outcome.go index 59ba9765f24..34ff92668e3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/outcome.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/outcome.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,16 +15,16 @@ import ( "strings" ) -// Outcome Execution Outcome +// Outcome Execution Outcome. type Outcome struct { - // A shortened version of Execution Output + // A shortened version of Execution output. Output *string `mandatory:"true" json:"output"` - // Errors if any associated with the execution + // Errors if any, associated with the execution. Error *string `mandatory:"false" json:"error"` - // Exit Code + // Exit Code. ExitCode *string `mandatory:"false" json:"exitCode"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_details.go index 93127d0c20c..10de91caacf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -22,7 +21,7 @@ type OutputVariableDetails struct { // The name of the task step the output variable belongs to. StepName *string `mandatory:"true" json:"stepName"` - // The name of the output variable whose value that has to be mapped. + // The name of the output variable whose value has to be mapped. OutputVariableName *string `mandatory:"true" json:"outputVariableName"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_input_argument.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_input_argument.go index 25618b823a8..1061b6ff2fd 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_input_argument.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_input_argument.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,10 +16,10 @@ import ( "strings" ) -// OutputVariableInputArgument The details of the output variable that will be used as Input argument. +// OutputVariableInputArgument The details of the output variable that will be used as the Input argument. type OutputVariableInputArgument struct { - // The name of the argument + // The name of the argument. Name *string `mandatory:"true" json:"name"` // The description of the argument. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_mapping.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_mapping.go index fd09a970088..a0b9057d7df 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_mapping.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/output_variable_mapping.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,11 @@ import ( "strings" ) -// OutputVariableMapping The details of the output variable that will be used as Input argument. +// OutputVariableMapping Output variable to Input variable mapping details. +// Output variable of a task can be used as an input variable for a subsequent task. type OutputVariableMapping struct { - // The name of the input variable + // The name of the input variable. Name *string `mandatory:"true" json:"name"` OutputVariableDetails *OutputVariableDetails `mandatory:"true" json:"outputVariableDetails"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch.go new file mode 100644 index 00000000000..8d73c606798 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch.go @@ -0,0 +1,285 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Patch Patch metadata for Custom and Oracle patches. +type Patch struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + // Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + PatchType *PatchType `mandatory:"true" json:"patchType"` + + // Patch Severity. + Severity PatchSeverityEnum `mandatory:"true" json:"severity"` + + // Date when the patch was released. + TimeReleased *common.SDKTime `mandatory:"true" json:"timeReleased"` + + ArtifactDetails ArtifactDetails `mandatory:"true" json:"artifactDetails"` + + Product *PatchProduct `mandatory:"true" json:"product"` + + // The current state of the Patch. + LifecycleState PatchLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Provide information on who defined the patch. + // Example: For Custom Patches the value will be USER_DEFINED + // For Oracle Defined Patches the value will be ORACLE_DEFINED + Type PatchTypeEnum `mandatory:"false" json:"type,omitempty"` + + // Dependent Patches for this patch. + DependentPatches []DependentPatchDetails `mandatory:"false" json:"dependentPatches"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m Patch) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Patch) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchSeverityEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetPatchSeverityEnumStringValues(), ","))) + } + if _, ok := GetMappingPatchLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPatchLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPatchTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetPatchTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *Patch) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + Type PatchTypeEnum `json:"type"` + DependentPatches []DependentPatchDetails `json:"dependentPatches"` + LifecycleDetails *string `json:"lifecycleDetails"` + ResourceRegion *string `json:"resourceRegion"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + Name *string `json:"name"` + PatchType *PatchType `json:"patchType"` + Severity PatchSeverityEnum `json:"severity"` + TimeReleased *common.SDKTime `json:"timeReleased"` + ArtifactDetails artifactdetails `json:"artifactDetails"` + Product *PatchProduct `json:"product"` + LifecycleState PatchLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + CompartmentId *string `json:"compartmentId"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.Type = model.Type + + m.DependentPatches = make([]DependentPatchDetails, len(model.DependentPatches)) + copy(m.DependentPatches, model.DependentPatches) + m.LifecycleDetails = model.LifecycleDetails + + m.ResourceRegion = model.ResourceRegion + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.Name = model.Name + + m.PatchType = model.PatchType + + m.Severity = model.Severity + + m.TimeReleased = model.TimeReleased + + nn, e = model.ArtifactDetails.UnmarshalPolymorphicJSON(model.ArtifactDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ArtifactDetails = nn.(ArtifactDetails) + } else { + m.ArtifactDetails = nil + } + + m.Product = model.Product + + m.LifecycleState = model.LifecycleState + + m.TimeCreated = model.TimeCreated + + m.TimeUpdated = model.TimeUpdated + + m.CompartmentId = model.CompartmentId + + return +} + +// PatchTypeEnum Enum with underlying type: string +type PatchTypeEnum string + +// Set of constants representing the allowable values for PatchTypeEnum +const ( + PatchTypeUserDefined PatchTypeEnum = "USER_DEFINED" + PatchTypeOracleDefined PatchTypeEnum = "ORACLE_DEFINED" +) + +var mappingPatchTypeEnum = map[string]PatchTypeEnum{ + "USER_DEFINED": PatchTypeUserDefined, + "ORACLE_DEFINED": PatchTypeOracleDefined, +} + +var mappingPatchTypeEnumLowerCase = map[string]PatchTypeEnum{ + "user_defined": PatchTypeUserDefined, + "oracle_defined": PatchTypeOracleDefined, +} + +// GetPatchTypeEnumValues Enumerates the set of values for PatchTypeEnum +func GetPatchTypeEnumValues() []PatchTypeEnum { + values := make([]PatchTypeEnum, 0) + for _, v := range mappingPatchTypeEnum { + values = append(values, v) + } + return values +} + +// GetPatchTypeEnumStringValues Enumerates the set of values in String for PatchTypeEnum +func GetPatchTypeEnumStringValues() []string { + return []string{ + "USER_DEFINED", + "ORACLE_DEFINED", + } +} + +// GetMappingPatchTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchTypeEnum(val string) (PatchTypeEnum, bool) { + enum, ok := mappingPatchTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PatchLifecycleStateEnum Enum with underlying type: string +type PatchLifecycleStateEnum string + +// Set of constants representing the allowable values for PatchLifecycleStateEnum +const ( + PatchLifecycleStateActive PatchLifecycleStateEnum = "ACTIVE" + PatchLifecycleStateInactive PatchLifecycleStateEnum = "INACTIVE" + PatchLifecycleStateDeleted PatchLifecycleStateEnum = "DELETED" + PatchLifecycleStateDeleting PatchLifecycleStateEnum = "DELETING" + PatchLifecycleStateFailed PatchLifecycleStateEnum = "FAILED" + PatchLifecycleStateUpdating PatchLifecycleStateEnum = "UPDATING" +) + +var mappingPatchLifecycleStateEnum = map[string]PatchLifecycleStateEnum{ + "ACTIVE": PatchLifecycleStateActive, + "INACTIVE": PatchLifecycleStateInactive, + "DELETED": PatchLifecycleStateDeleted, + "DELETING": PatchLifecycleStateDeleting, + "FAILED": PatchLifecycleStateFailed, + "UPDATING": PatchLifecycleStateUpdating, +} + +var mappingPatchLifecycleStateEnumLowerCase = map[string]PatchLifecycleStateEnum{ + "active": PatchLifecycleStateActive, + "inactive": PatchLifecycleStateInactive, + "deleted": PatchLifecycleStateDeleted, + "deleting": PatchLifecycleStateDeleting, + "failed": PatchLifecycleStateFailed, + "updating": PatchLifecycleStateUpdating, +} + +// GetPatchLifecycleStateEnumValues Enumerates the set of values for PatchLifecycleStateEnum +func GetPatchLifecycleStateEnumValues() []PatchLifecycleStateEnum { + values := make([]PatchLifecycleStateEnum, 0) + for _, v := range mappingPatchLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPatchLifecycleStateEnumStringValues Enumerates the set of values in String for PatchLifecycleStateEnum +func GetPatchLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "INACTIVE", + "DELETED", + "DELETING", + "FAILED", + "UPDATING", + } +} + +// GetMappingPatchLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchLifecycleStateEnum(val string) (PatchLifecycleStateEnum, bool) { + enum, ok := mappingPatchLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_collection.go new file mode 100644 index 00000000000..29455abdde2 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchCollection Results of a patch search. Contains both PatchSummary items and other information, such as metadata. +type PatchCollection struct { + + // List of patches. + Items []PatchSummary `mandatory:"true" json:"items"` +} + +func (m PatchCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_level_selection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_level_selection_details.go new file mode 100644 index 00000000000..7798c22e977 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_level_selection_details.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchLevelSelectionDetails Patch Level Details. +// If you set the policy rule by selecting this option and provide the Patch level as Latest, Fleet Application Management calculates the compliance status of the product in the following ways: +// - Reports the patch process as compliant for the software identified or targets discovered at the Latest and Latest-1 version. +// - Reports the patch process as noncompliant for the software identified or targets discovered at the Latest-2 version. +type PatchLevelSelectionDetails struct { + + // Patch Name. + PatchLevel PatchLevelSelectionDetailsPatchLevelEnum `mandatory:"true" json:"patchLevel"` +} + +func (m PatchLevelSelectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchLevelSelectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchLevelSelectionDetailsPatchLevelEnum(string(m.PatchLevel)); !ok && m.PatchLevel != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PatchLevel: %s. Supported values are: %s.", m.PatchLevel, strings.Join(GetPatchLevelSelectionDetailsPatchLevelEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchLevelSelectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchLevelSelectionDetails PatchLevelSelectionDetails + s := struct { + DiscriminatorParam string `json:"selectionType"` + MarshalTypePatchLevelSelectionDetails + }{ + "PATCH_LEVEL", + (MarshalTypePatchLevelSelectionDetails)(m), + } + + return json.Marshal(&s) +} + +// PatchLevelSelectionDetailsPatchLevelEnum Enum with underlying type: string +type PatchLevelSelectionDetailsPatchLevelEnum string + +// Set of constants representing the allowable values for PatchLevelSelectionDetailsPatchLevelEnum +const ( + PatchLevelSelectionDetailsPatchLevelLatest PatchLevelSelectionDetailsPatchLevelEnum = "LATEST" + PatchLevelSelectionDetailsPatchLevelLatestMinusOne PatchLevelSelectionDetailsPatchLevelEnum = "LATEST_MINUS_ONE" + PatchLevelSelectionDetailsPatchLevelLatestMinusTwo PatchLevelSelectionDetailsPatchLevelEnum = "LATEST_MINUS_TWO" +) + +var mappingPatchLevelSelectionDetailsPatchLevelEnum = map[string]PatchLevelSelectionDetailsPatchLevelEnum{ + "LATEST": PatchLevelSelectionDetailsPatchLevelLatest, + "LATEST_MINUS_ONE": PatchLevelSelectionDetailsPatchLevelLatestMinusOne, + "LATEST_MINUS_TWO": PatchLevelSelectionDetailsPatchLevelLatestMinusTwo, +} + +var mappingPatchLevelSelectionDetailsPatchLevelEnumLowerCase = map[string]PatchLevelSelectionDetailsPatchLevelEnum{ + "latest": PatchLevelSelectionDetailsPatchLevelLatest, + "latest_minus_one": PatchLevelSelectionDetailsPatchLevelLatestMinusOne, + "latest_minus_two": PatchLevelSelectionDetailsPatchLevelLatestMinusTwo, +} + +// GetPatchLevelSelectionDetailsPatchLevelEnumValues Enumerates the set of values for PatchLevelSelectionDetailsPatchLevelEnum +func GetPatchLevelSelectionDetailsPatchLevelEnumValues() []PatchLevelSelectionDetailsPatchLevelEnum { + values := make([]PatchLevelSelectionDetailsPatchLevelEnum, 0) + for _, v := range mappingPatchLevelSelectionDetailsPatchLevelEnum { + values = append(values, v) + } + return values +} + +// GetPatchLevelSelectionDetailsPatchLevelEnumStringValues Enumerates the set of values in String for PatchLevelSelectionDetailsPatchLevelEnum +func GetPatchLevelSelectionDetailsPatchLevelEnumStringValues() []string { + return []string{ + "LATEST", + "LATEST_MINUS_ONE", + "LATEST_MINUS_TWO", + } +} + +// GetMappingPatchLevelSelectionDetailsPatchLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchLevelSelectionDetailsPatchLevelEnum(val string) (PatchLevelSelectionDetailsPatchLevelEnum, bool) { + enum, ok := mappingPatchLevelSelectionDetailsPatchLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_name_selection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_name_selection_details.go new file mode 100644 index 00000000000..7727fdb1e71 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_name_selection_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchNameSelectionDetails Patch Name Details. +// If you set the policy rule by selecting this option, provide a specific patch name. +type PatchNameSelectionDetails struct { + + // Patch Name. + PatchName *string `mandatory:"true" json:"patchName"` +} + +func (m PatchNameSelectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchNameSelectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchNameSelectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchNameSelectionDetails PatchNameSelectionDetails + s := struct { + DiscriminatorParam string `json:"selectionType"` + MarshalTypePatchNameSelectionDetails + }{ + "PATCH_NAME", + (MarshalTypePatchNameSelectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_product.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_product.go new file mode 100644 index 00000000000..08548e1a095 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_product.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchProduct Product +type PatchProduct struct { + + // PlatformConfiguration Id corresponding to the Product + PlatformConfigurationId *string `mandatory:"true" json:"platformConfigurationId"` + + // product version. + Version *string `mandatory:"false" json:"version"` +} + +func (m PatchProduct) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchProduct) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_release_date_selection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_release_date_selection_details.go new file mode 100644 index 00000000000..e30b6975212 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_release_date_selection_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchReleaseDateSelectionDetails Days since patch release date details. +// If you set the policy rule by selecting this option and entering the number of days since release, Fleet Application Management calculates the number of days passed after the release date and reports the product as noncompliant if the days exceed the number provided in Days since release +type PatchReleaseDateSelectionDetails struct { + + // Days passed since patch release. + DaysSinceRelease *int `mandatory:"true" json:"daysSinceRelease"` +} + +func (m PatchReleaseDateSelectionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchReleaseDateSelectionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchReleaseDateSelectionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchReleaseDateSelectionDetails PatchReleaseDateSelectionDetails + s := struct { + DiscriminatorParam string `json:"selectionType"` + MarshalTypePatchReleaseDateSelectionDetails + }{ + "PATCH_RELEASE_DATE", + (MarshalTypePatchReleaseDateSelectionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_selection_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_selection_details.go new file mode 100644 index 00000000000..a2fd3ef40a9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_selection_details.go @@ -0,0 +1,131 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchSelectionDetails Patch Selection Details +type PatchSelectionDetails interface { +} + +type patchselectiondetails struct { + JsonData []byte + SelectionType string `json:"selectionType"` +} + +// UnmarshalJSON unmarshals json +func (m *patchselectiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpatchselectiondetails patchselectiondetails + s := struct { + Model Unmarshalerpatchselectiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SelectionType = s.Model.SelectionType + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *patchselectiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SelectionType { + case "PATCH_LEVEL": + mm := PatchLevelSelectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PATCH_RELEASE_DATE": + mm := PatchReleaseDateSelectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PATCH_NAME": + mm := PatchNameSelectionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PatchSelectionDetails: %s.", m.SelectionType) + return *m, nil + } +} + +func (m patchselectiondetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m patchselectiondetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PatchSelectionDetailsSelectionTypeEnum Enum with underlying type: string +type PatchSelectionDetailsSelectionTypeEnum string + +// Set of constants representing the allowable values for PatchSelectionDetailsSelectionTypeEnum +const ( + PatchSelectionDetailsSelectionTypeLevel PatchSelectionDetailsSelectionTypeEnum = "PATCH_LEVEL" + PatchSelectionDetailsSelectionTypeName PatchSelectionDetailsSelectionTypeEnum = "PATCH_NAME" + PatchSelectionDetailsSelectionTypeReleaseDate PatchSelectionDetailsSelectionTypeEnum = "PATCH_RELEASE_DATE" +) + +var mappingPatchSelectionDetailsSelectionTypeEnum = map[string]PatchSelectionDetailsSelectionTypeEnum{ + "PATCH_LEVEL": PatchSelectionDetailsSelectionTypeLevel, + "PATCH_NAME": PatchSelectionDetailsSelectionTypeName, + "PATCH_RELEASE_DATE": PatchSelectionDetailsSelectionTypeReleaseDate, +} + +var mappingPatchSelectionDetailsSelectionTypeEnumLowerCase = map[string]PatchSelectionDetailsSelectionTypeEnum{ + "patch_level": PatchSelectionDetailsSelectionTypeLevel, + "patch_name": PatchSelectionDetailsSelectionTypeName, + "patch_release_date": PatchSelectionDetailsSelectionTypeReleaseDate, +} + +// GetPatchSelectionDetailsSelectionTypeEnumValues Enumerates the set of values for PatchSelectionDetailsSelectionTypeEnum +func GetPatchSelectionDetailsSelectionTypeEnumValues() []PatchSelectionDetailsSelectionTypeEnum { + values := make([]PatchSelectionDetailsSelectionTypeEnum, 0) + for _, v := range mappingPatchSelectionDetailsSelectionTypeEnum { + values = append(values, v) + } + return values +} + +// GetPatchSelectionDetailsSelectionTypeEnumStringValues Enumerates the set of values in String for PatchSelectionDetailsSelectionTypeEnum +func GetPatchSelectionDetailsSelectionTypeEnumStringValues() []string { + return []string{ + "PATCH_LEVEL", + "PATCH_NAME", + "PATCH_RELEASE_DATE", + } +} + +// GetMappingPatchSelectionDetailsSelectionTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchSelectionDetailsSelectionTypeEnum(val string) (PatchSelectionDetailsSelectionTypeEnum, bool) { + enum, ok := mappingPatchSelectionDetailsSelectionTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_severity.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_severity.go new file mode 100644 index 00000000000..c4619cb94e8 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_severity.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "strings" +) + +// PatchSeverityEnum Enum with underlying type: string +type PatchSeverityEnum string + +// Set of constants representing the allowable values for PatchSeverityEnum +const ( + PatchSeverityCritical PatchSeverityEnum = "CRITICAL" + PatchSeverityHigh PatchSeverityEnum = "HIGH" + PatchSeverityMedium PatchSeverityEnum = "MEDIUM" + PatchSeverityLow PatchSeverityEnum = "LOW" +) + +var mappingPatchSeverityEnum = map[string]PatchSeverityEnum{ + "CRITICAL": PatchSeverityCritical, + "HIGH": PatchSeverityHigh, + "MEDIUM": PatchSeverityMedium, + "LOW": PatchSeverityLow, +} + +var mappingPatchSeverityEnumLowerCase = map[string]PatchSeverityEnum{ + "critical": PatchSeverityCritical, + "high": PatchSeverityHigh, + "medium": PatchSeverityMedium, + "low": PatchSeverityLow, +} + +// GetPatchSeverityEnumValues Enumerates the set of values for PatchSeverityEnum +func GetPatchSeverityEnumValues() []PatchSeverityEnum { + values := make([]PatchSeverityEnum, 0) + for _, v := range mappingPatchSeverityEnum { + values = append(values, v) + } + return values +} + +// GetPatchSeverityEnumStringValues Enumerates the set of values in String for PatchSeverityEnum +func GetPatchSeverityEnumStringValues() []string { + return []string{ + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW", + } +} + +// GetMappingPatchSeverityEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPatchSeverityEnum(val string) (PatchSeverityEnum, bool) { + enum, ok := mappingPatchSeverityEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_summary.go new file mode 100644 index 00000000000..230cd5b9687 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_summary.go @@ -0,0 +1,179 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchSummary Summary of the Patch. +type PatchSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // A user-friendly name. Should be unique within the tenancy, and cannot be changed after creation. + // Avoid entering confidential information. + Name *string `mandatory:"true" json:"name"` + + PatchType *PatchType `mandatory:"true" json:"patchType"` + + // Patch Severity. + Severity PatchSeverityEnum `mandatory:"true" json:"severity"` + + // Date when the patch was released. + TimeReleased *common.SDKTime `mandatory:"true" json:"timeReleased"` + + Product *PatchProduct `mandatory:"true" json:"product"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // The current state of the Patch. + LifecycleState PatchLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Provide information on who defined the patch. + // Example: For Custom Patches the value will be USER_DEFINED + // For Oracle Defined Patches the value will be ORACLE_DEFINED + Type PatchTypeEnum `mandatory:"false" json:"type,omitempty"` + + ArtifactDetails ArtifactDetails `mandatory:"false" json:"artifactDetails"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Associated region + ResourceRegion *string `mandatory:"false" json:"resourceRegion"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m PatchSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPatchSeverityEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetPatchSeverityEnumStringValues(), ","))) + } + if _, ok := GetMappingPatchLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPatchLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPatchTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetPatchTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PatchSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + Type PatchTypeEnum `json:"type"` + ArtifactDetails artifactdetails `json:"artifactDetails"` + LifecycleDetails *string `json:"lifecycleDetails"` + ResourceRegion *string `json:"resourceRegion"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + Name *string `json:"name"` + PatchType *PatchType `json:"patchType"` + Severity PatchSeverityEnum `json:"severity"` + TimeReleased *common.SDKTime `json:"timeReleased"` + Product *PatchProduct `json:"product"` + CompartmentId *string `json:"compartmentId"` + LifecycleState PatchLifecycleStateEnum `json:"lifecycleState"` + TimeCreated *common.SDKTime `json:"timeCreated"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.Type = model.Type + + nn, e = model.ArtifactDetails.UnmarshalPolymorphicJSON(model.ArtifactDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ArtifactDetails = nn.(ArtifactDetails) + } else { + m.ArtifactDetails = nil + } + + m.LifecycleDetails = model.LifecycleDetails + + m.ResourceRegion = model.ResourceRegion + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.Name = model.Name + + m.PatchType = model.PatchType + + m.Severity = model.Severity + + m.TimeReleased = model.TimeReleased + + m.Product = model.Product + + m.CompartmentId = model.CompartmentId + + m.LifecycleState = model.LifecycleState + + m.TimeCreated = model.TimeCreated + + m.TimeUpdated = model.TimeUpdated + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type.go new file mode 100644 index 00000000000..7d04b7822e1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchType Patch Type +type PatchType struct { + + // PlatformConfiguration Id corresponding to the Patch Type + PlatformConfigurationId *string `mandatory:"true" json:"platformConfigurationId"` +} + +func (m PatchType) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchType) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type_config_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type_config_category_details.go new file mode 100644 index 00000000000..c37499cfe91 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/patch_type_config_category_details.go @@ -0,0 +1,52 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PatchTypeConfigCategoryDetails Patch Type Config Category Details. +// Defines software patch types as per product standards referred under available Patches for supported products. +type PatchTypeConfigCategoryDetails struct { +} + +func (m PatchTypeConfigCategoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PatchTypeConfigCategoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PatchTypeConfigCategoryDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypePatchTypeConfigCategoryDetails PatchTypeConfigCategoryDetails + s := struct { + DiscriminatorParam string `json:"configCategory"` + MarshalTypePatchTypeConfigCategoryDetails + }{ + "PATCH_TYPE", + (MarshalTypePatchTypeConfigCategoryDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/pause_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/pause_details.go new file mode 100644 index 00000000000..dfb4788553e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/pause_details.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PauseDetails Pause Details +type PauseDetails interface { +} + +type pausedetails struct { + JsonData []byte + Kind string `json:"kind"` +} + +// UnmarshalJSON unmarshals json +func (m *pausedetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerpausedetails pausedetails + s := struct { + Model Unmarshalerpausedetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Kind = s.Model.Kind + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *pausedetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Kind { + case "USER_ACTION": + mm := UserActionBasedPauseDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "TIME_BASED": + mm := TimeBasedPauseDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for PauseDetails: %s.", m.Kind) + return *m, nil + } +} + +func (m pausedetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m pausedetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PauseDetailsKindEnum Enum with underlying type: string +type PauseDetailsKindEnum string + +// Set of constants representing the allowable values for PauseDetailsKindEnum +const ( + PauseDetailsKindUserAction PauseDetailsKindEnum = "USER_ACTION" + PauseDetailsKindTimeBased PauseDetailsKindEnum = "TIME_BASED" +) + +var mappingPauseDetailsKindEnum = map[string]PauseDetailsKindEnum{ + "USER_ACTION": PauseDetailsKindUserAction, + "TIME_BASED": PauseDetailsKindTimeBased, +} + +var mappingPauseDetailsKindEnumLowerCase = map[string]PauseDetailsKindEnum{ + "user_action": PauseDetailsKindUserAction, + "time_based": PauseDetailsKindTimeBased, +} + +// GetPauseDetailsKindEnumValues Enumerates the set of values for PauseDetailsKindEnum +func GetPauseDetailsKindEnumValues() []PauseDetailsKindEnum { + values := make([]PauseDetailsKindEnum, 0) + for _, v := range mappingPauseDetailsKindEnum { + values = append(values, v) + } + return values +} + +// GetPauseDetailsKindEnumStringValues Enumerates the set of values in String for PauseDetailsKindEnum +func GetPauseDetailsKindEnumStringValues() []string { + return []string{ + "USER_ACTION", + "TIME_BASED", + } +} + +// GetMappingPauseDetailsKindEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPauseDetailsKindEnum(val string) (PauseDetailsKindEnum, bool) { + enum, ok := mappingPauseDetailsKindEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/plain_text_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/plain_text_credential_details.go index ce06c733ec6..3e597b00e63 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/plain_text_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/plain_text_credential_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -20,7 +19,7 @@ import ( // PlainTextCredentialDetails Details for plain text credentials. type PlainTextCredentialDetails struct { - // The value corresponding to the credential + // The value corresponding to the credential. Value *string `mandatory:"true" json:"value"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration.go new file mode 100644 index 00000000000..3a5cdcaa821 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration.go @@ -0,0 +1,249 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlatformConfiguration Fleet Application Management Platform Configuration . +type PlatformConfiguration struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Associated region + ResourceRegion *string `mandatory:"true" json:"resourceRegion"` + + // The current state of the PlatformConfiguration. + LifecycleState PlatformConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The type of the configuration. + Type PlatformConfigurationTypeEnum `mandatory:"false" json:"type,omitempty"` + + ConfigCategoryDetails ConfigCategoryDetails `mandatory:"false" json:"configCategoryDetails"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m PlatformConfiguration) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlatformConfiguration) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPlatformConfigurationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPlatformConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPlatformConfigurationTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetPlatformConfigurationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PlatformConfiguration) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + Type PlatformConfigurationTypeEnum `json:"type"` + ConfigCategoryDetails configcategorydetails `json:"configCategoryDetails"` + LifecycleDetails *string `json:"lifecycleDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + TimeCreated *common.SDKTime `json:"timeCreated"` + ResourceRegion *string `json:"resourceRegion"` + LifecycleState PlatformConfigurationLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.TimeUpdated = model.TimeUpdated + + m.Type = model.Type + + nn, e = model.ConfigCategoryDetails.UnmarshalPolymorphicJSON(model.ConfigCategoryDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConfigCategoryDetails = nn.(ConfigCategoryDetails) + } else { + m.ConfigCategoryDetails = nil + } + + m.LifecycleDetails = model.LifecycleDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.DisplayName = model.DisplayName + + m.TimeCreated = model.TimeCreated + + m.ResourceRegion = model.ResourceRegion + + m.LifecycleState = model.LifecycleState + + return +} + +// PlatformConfigurationTypeEnum Enum with underlying type: string +type PlatformConfigurationTypeEnum string + +// Set of constants representing the allowable values for PlatformConfigurationTypeEnum +const ( + PlatformConfigurationTypeUserDefined PlatformConfigurationTypeEnum = "USER_DEFINED" + PlatformConfigurationTypeOracleDefined PlatformConfigurationTypeEnum = "ORACLE_DEFINED" +) + +var mappingPlatformConfigurationTypeEnum = map[string]PlatformConfigurationTypeEnum{ + "USER_DEFINED": PlatformConfigurationTypeUserDefined, + "ORACLE_DEFINED": PlatformConfigurationTypeOracleDefined, +} + +var mappingPlatformConfigurationTypeEnumLowerCase = map[string]PlatformConfigurationTypeEnum{ + "user_defined": PlatformConfigurationTypeUserDefined, + "oracle_defined": PlatformConfigurationTypeOracleDefined, +} + +// GetPlatformConfigurationTypeEnumValues Enumerates the set of values for PlatformConfigurationTypeEnum +func GetPlatformConfigurationTypeEnumValues() []PlatformConfigurationTypeEnum { + values := make([]PlatformConfigurationTypeEnum, 0) + for _, v := range mappingPlatformConfigurationTypeEnum { + values = append(values, v) + } + return values +} + +// GetPlatformConfigurationTypeEnumStringValues Enumerates the set of values in String for PlatformConfigurationTypeEnum +func GetPlatformConfigurationTypeEnumStringValues() []string { + return []string{ + "USER_DEFINED", + "ORACLE_DEFINED", + } +} + +// GetMappingPlatformConfigurationTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPlatformConfigurationTypeEnum(val string) (PlatformConfigurationTypeEnum, bool) { + enum, ok := mappingPlatformConfigurationTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PlatformConfigurationLifecycleStateEnum Enum with underlying type: string +type PlatformConfigurationLifecycleStateEnum string + +// Set of constants representing the allowable values for PlatformConfigurationLifecycleStateEnum +const ( + PlatformConfigurationLifecycleStateActive PlatformConfigurationLifecycleStateEnum = "ACTIVE" + PlatformConfigurationLifecycleStateDeleted PlatformConfigurationLifecycleStateEnum = "DELETED" + PlatformConfigurationLifecycleStateFailed PlatformConfigurationLifecycleStateEnum = "FAILED" + PlatformConfigurationLifecycleStateDeleting PlatformConfigurationLifecycleStateEnum = "DELETING" + PlatformConfigurationLifecycleStateUpdating PlatformConfigurationLifecycleStateEnum = "UPDATING" +) + +var mappingPlatformConfigurationLifecycleStateEnum = map[string]PlatformConfigurationLifecycleStateEnum{ + "ACTIVE": PlatformConfigurationLifecycleStateActive, + "DELETED": PlatformConfigurationLifecycleStateDeleted, + "FAILED": PlatformConfigurationLifecycleStateFailed, + "DELETING": PlatformConfigurationLifecycleStateDeleting, + "UPDATING": PlatformConfigurationLifecycleStateUpdating, +} + +var mappingPlatformConfigurationLifecycleStateEnumLowerCase = map[string]PlatformConfigurationLifecycleStateEnum{ + "active": PlatformConfigurationLifecycleStateActive, + "deleted": PlatformConfigurationLifecycleStateDeleted, + "failed": PlatformConfigurationLifecycleStateFailed, + "deleting": PlatformConfigurationLifecycleStateDeleting, + "updating": PlatformConfigurationLifecycleStateUpdating, +} + +// GetPlatformConfigurationLifecycleStateEnumValues Enumerates the set of values for PlatformConfigurationLifecycleStateEnum +func GetPlatformConfigurationLifecycleStateEnumValues() []PlatformConfigurationLifecycleStateEnum { + values := make([]PlatformConfigurationLifecycleStateEnum, 0) + for _, v := range mappingPlatformConfigurationLifecycleStateEnum { + values = append(values, v) + } + return values +} + +// GetPlatformConfigurationLifecycleStateEnumStringValues Enumerates the set of values in String for PlatformConfigurationLifecycleStateEnum +func GetPlatformConfigurationLifecycleStateEnumStringValues() []string { + return []string{ + "ACTIVE", + "DELETED", + "FAILED", + "DELETING", + "UPDATING", + } +} + +// GetMappingPlatformConfigurationLifecycleStateEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPlatformConfigurationLifecycleStateEnum(val string) (PlatformConfigurationLifecycleStateEnum, bool) { + enum, ok := mappingPlatformConfigurationLifecycleStateEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_collection.go new file mode 100644 index 00000000000..456ded5cc58 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlatformConfigurationCollection Results of a platform configuration search. +type PlatformConfigurationCollection struct { + + // List of configurations + Items []PlatformConfigurationSummary `mandatory:"true" json:"items"` +} + +func (m PlatformConfigurationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlatformConfigurationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_summary.go new file mode 100644 index 00000000000..8520a04c9ef --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_configuration_summary.go @@ -0,0 +1,153 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlatformConfigurationSummary Summary of the PlatformConfiguration. +type PlatformConfigurationSummary struct { + + // The OCID of the resource. + Id *string `mandatory:"true" json:"id"` + + // Tenancy OCID + CompartmentId *string `mandatory:"true" json:"compartmentId"` + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"true" json:"displayName"` + + // The time this resource was created. An RFC3339 formatted datetime string. + TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"` + + // Associated region + ResourceRegion *string `mandatory:"true" json:"resourceRegion"` + + // The current state of the PlatformConfiguration. + LifecycleState PlatformConfigurationLifecycleStateEnum `mandatory:"true" json:"lifecycleState"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // The time this resource was last updated. An RFC3339 formatted datetime string. + TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` + + // The type of the configuration. + Type PlatformConfigurationTypeEnum `mandatory:"false" json:"type,omitempty"` + + ConfigCategoryDetails ConfigCategoryDetails `mandatory:"false" json:"configCategoryDetails"` + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m PlatformConfigurationSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlatformConfigurationSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPlatformConfigurationLifecycleStateEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetPlatformConfigurationLifecycleStateEnumStringValues(), ","))) + } + + if _, ok := GetMappingPlatformConfigurationTypeEnum(string(m.Type)); !ok && m.Type != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetPlatformConfigurationTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PlatformConfigurationSummary) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + TimeUpdated *common.SDKTime `json:"timeUpdated"` + Type PlatformConfigurationTypeEnum `json:"type"` + ConfigCategoryDetails configcategorydetails `json:"configCategoryDetails"` + LifecycleDetails *string `json:"lifecycleDetails"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + SystemTags map[string]map[string]interface{} `json:"systemTags"` + Id *string `json:"id"` + CompartmentId *string `json:"compartmentId"` + DisplayName *string `json:"displayName"` + TimeCreated *common.SDKTime `json:"timeCreated"` + ResourceRegion *string `json:"resourceRegion"` + LifecycleState PlatformConfigurationLifecycleStateEnum `json:"lifecycleState"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.TimeUpdated = model.TimeUpdated + + m.Type = model.Type + + nn, e = model.ConfigCategoryDetails.UnmarshalPolymorphicJSON(model.ConfigCategoryDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConfigCategoryDetails = nn.(ConfigCategoryDetails) + } else { + m.ConfigCategoryDetails = nil + } + + m.LifecycleDetails = model.LifecycleDetails + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + m.SystemTags = model.SystemTags + + m.Id = model.Id + + m.CompartmentId = model.CompartmentId + + m.DisplayName = model.DisplayName + + m.TimeCreated = model.TimeCreated + + m.ResourceRegion = model.ResourceRegion + + m.LifecycleState = model.LifecycleState + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact.go new file mode 100644 index 00000000000..f366fcdbea4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact.go @@ -0,0 +1,164 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlatformSpecificArtifact Patch artifact metadata Details which is platform specific. +type PlatformSpecificArtifact struct { + Content ContentDetails `mandatory:"true" json:"content"` + + // The OS type the patch is applicable for. + OsType PlatformSpecificArtifactOsTypeEnum `mandatory:"true" json:"osType"` + + // System architecture. + Architecture PlatformSpecificArtifactArchitectureEnum `mandatory:"true" json:"architecture"` +} + +func (m PlatformSpecificArtifact) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlatformSpecificArtifact) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingPlatformSpecificArtifactOsTypeEnum(string(m.OsType)); !ok && m.OsType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsType: %s. Supported values are: %s.", m.OsType, strings.Join(GetPlatformSpecificArtifactOsTypeEnumStringValues(), ","))) + } + if _, ok := GetMappingPlatformSpecificArtifactArchitectureEnum(string(m.Architecture)); !ok && m.Architecture != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Architecture: %s. Supported values are: %s.", m.Architecture, strings.Join(GetPlatformSpecificArtifactArchitectureEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *PlatformSpecificArtifact) UnmarshalJSON(data []byte) (e error) { + model := struct { + Content contentdetails `json:"content"` + OsType PlatformSpecificArtifactOsTypeEnum `json:"osType"` + Architecture PlatformSpecificArtifactArchitectureEnum `json:"architecture"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.Content.UnmarshalPolymorphicJSON(model.Content.JsonData) + if e != nil { + return + } + if nn != nil { + m.Content = nn.(ContentDetails) + } else { + m.Content = nil + } + + m.OsType = model.OsType + + m.Architecture = model.Architecture + + return +} + +// PlatformSpecificArtifactOsTypeEnum Enum with underlying type: string +type PlatformSpecificArtifactOsTypeEnum string + +// Set of constants representing the allowable values for PlatformSpecificArtifactOsTypeEnum +const ( + PlatformSpecificArtifactOsTypeWindows PlatformSpecificArtifactOsTypeEnum = "WINDOWS" + PlatformSpecificArtifactOsTypeLinux PlatformSpecificArtifactOsTypeEnum = "LINUX" +) + +var mappingPlatformSpecificArtifactOsTypeEnum = map[string]PlatformSpecificArtifactOsTypeEnum{ + "WINDOWS": PlatformSpecificArtifactOsTypeWindows, + "LINUX": PlatformSpecificArtifactOsTypeLinux, +} + +var mappingPlatformSpecificArtifactOsTypeEnumLowerCase = map[string]PlatformSpecificArtifactOsTypeEnum{ + "windows": PlatformSpecificArtifactOsTypeWindows, + "linux": PlatformSpecificArtifactOsTypeLinux, +} + +// GetPlatformSpecificArtifactOsTypeEnumValues Enumerates the set of values for PlatformSpecificArtifactOsTypeEnum +func GetPlatformSpecificArtifactOsTypeEnumValues() []PlatformSpecificArtifactOsTypeEnum { + values := make([]PlatformSpecificArtifactOsTypeEnum, 0) + for _, v := range mappingPlatformSpecificArtifactOsTypeEnum { + values = append(values, v) + } + return values +} + +// GetPlatformSpecificArtifactOsTypeEnumStringValues Enumerates the set of values in String for PlatformSpecificArtifactOsTypeEnum +func GetPlatformSpecificArtifactOsTypeEnumStringValues() []string { + return []string{ + "WINDOWS", + "LINUX", + } +} + +// GetMappingPlatformSpecificArtifactOsTypeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPlatformSpecificArtifactOsTypeEnum(val string) (PlatformSpecificArtifactOsTypeEnum, bool) { + enum, ok := mappingPlatformSpecificArtifactOsTypeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// PlatformSpecificArtifactArchitectureEnum Enum with underlying type: string +type PlatformSpecificArtifactArchitectureEnum string + +// Set of constants representing the allowable values for PlatformSpecificArtifactArchitectureEnum +const ( + PlatformSpecificArtifactArchitectureArm64 PlatformSpecificArtifactArchitectureEnum = "ARM_64" + PlatformSpecificArtifactArchitectureX64 PlatformSpecificArtifactArchitectureEnum = "X64" +) + +var mappingPlatformSpecificArtifactArchitectureEnum = map[string]PlatformSpecificArtifactArchitectureEnum{ + "ARM_64": PlatformSpecificArtifactArchitectureArm64, + "X64": PlatformSpecificArtifactArchitectureX64, +} + +var mappingPlatformSpecificArtifactArchitectureEnumLowerCase = map[string]PlatformSpecificArtifactArchitectureEnum{ + "arm_64": PlatformSpecificArtifactArchitectureArm64, + "x64": PlatformSpecificArtifactArchitectureX64, +} + +// GetPlatformSpecificArtifactArchitectureEnumValues Enumerates the set of values for PlatformSpecificArtifactArchitectureEnum +func GetPlatformSpecificArtifactArchitectureEnumValues() []PlatformSpecificArtifactArchitectureEnum { + values := make([]PlatformSpecificArtifactArchitectureEnum, 0) + for _, v := range mappingPlatformSpecificArtifactArchitectureEnum { + values = append(values, v) + } + return values +} + +// GetPlatformSpecificArtifactArchitectureEnumStringValues Enumerates the set of values in String for PlatformSpecificArtifactArchitectureEnum +func GetPlatformSpecificArtifactArchitectureEnumStringValues() []string { + return []string{ + "ARM_64", + "X64", + } +} + +// GetMappingPlatformSpecificArtifactArchitectureEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingPlatformSpecificArtifactArchitectureEnum(val string) (PlatformSpecificArtifactArchitectureEnum, bool) { + enum, ok := mappingPlatformSpecificArtifactArchitectureEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact_details.go new file mode 100644 index 00000000000..0e75d4be1fa --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/platform_specific_artifact_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PlatformSpecificArtifactDetails Patch artifact description and content details which is platform specific +type PlatformSpecificArtifactDetails struct { + + // Artifacts. + Artifacts []PlatformSpecificArtifact `mandatory:"true" json:"artifacts"` +} + +func (m PlatformSpecificArtifactDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PlatformSpecificArtifactDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m PlatformSpecificArtifactDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypePlatformSpecificArtifactDetails PlatformSpecificArtifactDetails + s := struct { + DiscriminatorParam string `json:"category"` + MarshalTypePlatformSpecificArtifactDetails + }{ + "PLATFORM_SPECIFIC", + (MarshalTypePlatformSpecificArtifactDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/preferences.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/preferences.go index de1671c91a8..1748addf2b8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/preferences.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/preferences.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,13 +15,13 @@ import ( "strings" ) -// Preferences Preferences to send notifications on the fleet activities +// Preferences Preferences to send notifications on the fleet activities. type Preferences struct { // Enables notification on upcoming schedule. OnUpcomingSchedule *bool `mandatory:"false" json:"onUpcomingSchedule"` - // Enables or disables notification on Job Failures.' + // Enables or disables notification on Job Failures. OnJobFailure *bool `mandatory:"false" json:"onJobFailure"` // Enables or disables notification on Environment Fleet Topology Modification. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_config_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_config_category_details.go new file mode 100644 index 00000000000..1545837e978 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_config_category_details.go @@ -0,0 +1,71 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProductConfigCategoryDetails Product Config Category Details. +// Defines individual products which contribute to the applications hosting on the resources that are to be managed. +type ProductConfigCategoryDetails struct { + + // Versions associated with the PRODUCT . + Versions []string `mandatory:"true" json:"versions"` + + // OCID for the Credential name to be associated with the Product. + // These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + Credentials []ConfigAssociationDetails `mandatory:"false" json:"credentials"` + + // Various components of the Product. + // For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + // Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + Components []string `mandatory:"false" json:"components"` + + // Products compatible with this Product. + // Provide products from the list of other products you have created that are compatible with the present one + CompatibleProducts []ConfigAssociationDetails `mandatory:"false" json:"compatibleProducts"` + + // Patch Types associated with this Product. + PatchTypes []ConfigAssociationDetails `mandatory:"false" json:"patchTypes"` +} + +func (m ProductConfigCategoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProductConfigCategoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ProductConfigCategoryDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeProductConfigCategoryDetails ProductConfigCategoryDetails + s := struct { + DiscriminatorParam string `json:"configCategory"` + MarshalTypeProductConfigCategoryDetails + }{ + "PRODUCT", + (MarshalTypeProductConfigCategoryDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_as_product_sub_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_as_product_sub_category_details.go new file mode 100644 index 00000000000..b09ec7ff80b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_as_product_sub_category_details.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProductStackAsProductSubCategoryDetails Consider Product stack as product.To be provided if the product stack should be considered as a Product also. +// Allows compliance reporting and patching against the product stack target. +type ProductStackAsProductSubCategoryDetails struct { + + // Versions associated with the PRODUCT . + Versions []string `mandatory:"true" json:"versions"` + + // OCID for the Credential name to be associated with the Product Stack. + // These are useful for target discovery or lifecycle management activities, for example, Oracle WebLogic admin credentials for Oracle WebLogic Application server. + Credentials []ConfigAssociationDetails `mandatory:"false" json:"credentials"` + + // Various components of the Product. + // For example:The administration server or node manager can be the components of the Oracle WebLogic Application server. + // Forms server or concurrent manager can be the components of the Oracle E-Business Suite. + Components []string `mandatory:"false" json:"components"` + + // Patch Types associated with this Product Stack which will be considered as Product. + PatchTypes []ConfigAssociationDetails `mandatory:"false" json:"patchTypes"` +} + +func (m ProductStackAsProductSubCategoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProductStackAsProductSubCategoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ProductStackAsProductSubCategoryDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeProductStackAsProductSubCategoryDetails ProductStackAsProductSubCategoryDetails + s := struct { + DiscriminatorParam string `json:"subCategory"` + MarshalTypeProductStackAsProductSubCategoryDetails + }{ + "PRODUCT_STACK_AS_PRODUCT", + (MarshalTypeProductStackAsProductSubCategoryDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_config_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_config_category_details.go new file mode 100644 index 00000000000..1ecee57f052 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_config_category_details.go @@ -0,0 +1,85 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProductStackConfigCategoryDetails ProductStack Config Category Details. +// Defines suite or stack of products on which applications hosted by the resources are built and need to be managed. +type ProductStackConfigCategoryDetails struct { + + // Products that belong to the stack. + // For example, Oracle WebLogic and Java for the Oracle Fusion Middleware product stack. + Products []ConfigAssociationDetails `mandatory:"true" json:"products"` + + SubCategoryDetails ProductStackSubCategoryDetails `mandatory:"false" json:"subCategoryDetails"` +} + +func (m ProductStackConfigCategoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProductStackConfigCategoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ProductStackConfigCategoryDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeProductStackConfigCategoryDetails ProductStackConfigCategoryDetails + s := struct { + DiscriminatorParam string `json:"configCategory"` + MarshalTypeProductStackConfigCategoryDetails + }{ + "PRODUCT_STACK", + (MarshalTypeProductStackConfigCategoryDetails)(m), + } + + return json.Marshal(&s) +} + +// UnmarshalJSON unmarshals from json +func (m *ProductStackConfigCategoryDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + SubCategoryDetails productstacksubcategorydetails `json:"subCategoryDetails"` + Products []ConfigAssociationDetails `json:"products"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + nn, e = model.SubCategoryDetails.UnmarshalPolymorphicJSON(model.SubCategoryDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.SubCategoryDetails = nn.(ProductStackSubCategoryDetails) + } else { + m.SubCategoryDetails = nil + } + + m.Products = make([]ConfigAssociationDetails, len(model.Products)) + copy(m.Products, model.Products) + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_generic_sub_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_generic_sub_category_details.go new file mode 100644 index 00000000000..aac42520e13 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_generic_sub_category_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProductStackGenericSubCategoryDetails Generic Product Stack.Can be used for grouping Products. +type ProductStackGenericSubCategoryDetails struct { +} + +func (m ProductStackGenericSubCategoryDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProductStackGenericSubCategoryDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ProductStackGenericSubCategoryDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeProductStackGenericSubCategoryDetails ProductStackGenericSubCategoryDetails + s := struct { + DiscriminatorParam string `json:"subCategory"` + MarshalTypeProductStackGenericSubCategoryDetails + }{ + "PRODUCT_STACK_GENERIC", + (MarshalTypeProductStackGenericSubCategoryDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_sub_category_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_sub_category_details.go new file mode 100644 index 00000000000..68c8768bd2b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_stack_sub_category_details.go @@ -0,0 +1,123 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProductStackSubCategoryDetails ProductStack Config Category Details. +type ProductStackSubCategoryDetails interface { +} + +type productstacksubcategorydetails struct { + JsonData []byte + SubCategory string `json:"subCategory"` +} + +// UnmarshalJSON unmarshals json +func (m *productstacksubcategorydetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshalerproductstacksubcategorydetails productstacksubcategorydetails + s := struct { + Model Unmarshalerproductstacksubcategorydetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.SubCategory = s.Model.SubCategory + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *productstacksubcategorydetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.SubCategory { + case "PRODUCT_STACK_AS_PRODUCT": + mm := ProductStackAsProductSubCategoryDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "PRODUCT_STACK_GENERIC": + mm := ProductStackGenericSubCategoryDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for ProductStackSubCategoryDetails: %s.", m.SubCategory) + return *m, nil + } +} + +func (m productstacksubcategorydetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m productstacksubcategorydetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// ProductStackSubCategoryDetailsSubCategoryEnum Enum with underlying type: string +type ProductStackSubCategoryDetailsSubCategoryEnum string + +// Set of constants representing the allowable values for ProductStackSubCategoryDetailsSubCategoryEnum +const ( + ProductStackSubCategoryDetailsSubCategoryGeneric ProductStackSubCategoryDetailsSubCategoryEnum = "PRODUCT_STACK_GENERIC" + ProductStackSubCategoryDetailsSubCategoryAsProduct ProductStackSubCategoryDetailsSubCategoryEnum = "PRODUCT_STACK_AS_PRODUCT" +) + +var mappingProductStackSubCategoryDetailsSubCategoryEnum = map[string]ProductStackSubCategoryDetailsSubCategoryEnum{ + "PRODUCT_STACK_GENERIC": ProductStackSubCategoryDetailsSubCategoryGeneric, + "PRODUCT_STACK_AS_PRODUCT": ProductStackSubCategoryDetailsSubCategoryAsProduct, +} + +var mappingProductStackSubCategoryDetailsSubCategoryEnumLowerCase = map[string]ProductStackSubCategoryDetailsSubCategoryEnum{ + "product_stack_generic": ProductStackSubCategoryDetailsSubCategoryGeneric, + "product_stack_as_product": ProductStackSubCategoryDetailsSubCategoryAsProduct, +} + +// GetProductStackSubCategoryDetailsSubCategoryEnumValues Enumerates the set of values for ProductStackSubCategoryDetailsSubCategoryEnum +func GetProductStackSubCategoryDetailsSubCategoryEnumValues() []ProductStackSubCategoryDetailsSubCategoryEnum { + values := make([]ProductStackSubCategoryDetailsSubCategoryEnum, 0) + for _, v := range mappingProductStackSubCategoryDetailsSubCategoryEnum { + values = append(values, v) + } + return values +} + +// GetProductStackSubCategoryDetailsSubCategoryEnumStringValues Enumerates the set of values in String for ProductStackSubCategoryDetailsSubCategoryEnum +func GetProductStackSubCategoryDetailsSubCategoryEnumStringValues() []string { + return []string{ + "PRODUCT_STACK_GENERIC", + "PRODUCT_STACK_AS_PRODUCT", + } +} + +// GetMappingProductStackSubCategoryDetailsSubCategoryEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingProductStackSubCategoryDetailsSubCategoryEnum(val string) (ProductStackSubCategoryDetailsSubCategoryEnum, bool) { + enum, ok := mappingProductStackSubCategoryDetailsSubCategoryEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_version_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_version_details.go new file mode 100644 index 00000000000..560b171147f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/product_version_details.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ProductVersionDetails A specific product version or a specific version and succeeding. +// Example: 12.1 or 12.1 and above for Oracle WebLogic Application server. +// The policy applies to the next version only, and not to other versions such as, 12.1.x. +type ProductVersionDetails struct { + + // Product version the rule is applicable. + Version *string `mandatory:"true" json:"version"` + + // Is rule applicable to all higher versions also + IsApplicableForAllHigherVersions *bool `mandatory:"false" json:"isApplicableForAllHigherVersions"` +} + +func (m ProductVersionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ProductVersionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/properties.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/properties.go index 8c0934c29ae..760d0ab6374 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/properties.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/properties.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property.go index ad30cc6b6f2..7ecbfbd274c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// Property Taxonomy metadata aka Property . +// Property Global metadata element details. type Property struct { // The OCID of the resource. @@ -45,16 +44,16 @@ type Property struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Text selection of the category + // Text selection of the property. Selection SelectionEnum `mandatory:"false" json:"selection,omitempty"` - // Format of the value + // Format of the value. ValueType ValueTypeEnum `mandatory:"false" json:"valueType,omitempty"` - // Values of the property (must be a single value if selection = 'single choice') + // Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). Values []string `mandatory:"false" json:"values"` - // The scope of the property + // The scope of the property. Scope ScopeEnum `mandatory:"false" json:"scope,omitempty"` // The type of the property. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_collection.go index 89fe698abc1..990606f57f1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// PropertyCollection Results of a property search. Contains boh PropertySummary items and other information, such as metadata. +// PropertyCollection Results of a property search. Contains both PropertySummary items and other information, such as metadata. type PropertyCollection struct { - // List of propertys. + // List of properties. Items []PropertySummary `mandatory:"true" json:"items"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_summary.go index 0b06d03975a..1d0f35ab03b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/property_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -45,16 +44,16 @@ type PropertySummary struct { // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. LifecycleDetails *string `mandatory:"false" json:"lifecycleDetails"` - // Text selection of the category + // Text selection of the property. Selection SelectionEnum `mandatory:"false" json:"selection,omitempty"` - // Format of the value + // Format of the value. ValueType ValueTypeEnum `mandatory:"false" json:"valueType,omitempty"` - // Values of the property (must be a single value if selection = 'single choice') + // Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). Values []string `mandatory:"false" json:"values"` - // The scope of the property + // The scope of the property. Scope ScopeEnum `mandatory:"false" json:"scope,omitempty"` // The type of the property. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_details.go new file mode 100644 index 00000000000..824ef620e60 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// PublishRunbookDetails Request to publish Runbook. +type PublishRunbookDetails struct { + + // The OCID of the resource. + RunbookId *string `mandatory:"true" json:"runbookId"` +} + +func (m PublishRunbookDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m PublishRunbookDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_request_response.go new file mode 100644 index 00000000000..1d8c8ba71ab --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/publish_runbook_request_response.go @@ -0,0 +1,104 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// PublishRunbookRequest wrapper for the PublishRunbook operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/PublishRunbook.go.html to see an example of how to use PublishRunbookRequest. +type PublishRunbookRequest struct { + + // Details for publishing the Runbook. + PublishRunbookDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request PublishRunbookRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request PublishRunbookRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request PublishRunbookRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request PublishRunbookRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request PublishRunbookRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// PublishRunbookResponse wrapper for the PublishRunbook operation +type PublishRunbookResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response PublishRunbookResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response PublishRunbookResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_details.go index aabe2aa5d42..9610167a661 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,13 +15,13 @@ import ( "strings" ) -// RequestResourceValidationDetails Request to initiate resource validation +// RequestResourceValidationDetails Request to initiate resource validation. type RequestResourceValidationDetails struct { - // A boolean flag which decides if all resources within the fleet should be part of vaidation. + // A boolean flag that decides if all resources within the fleet should be part of the validation. IsApplicableToAllResources *bool `mandatory:"false" json:"isApplicableToAllResources"` - // Resource OCIDS that need to be included for validation. + // Resource OCIDS to be included for validation. ResourceIds []string `mandatory:"false" json:"resourceIds"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_request_response.go index b4c1b34be49..3bce2bc04b0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_resource_validation_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/RequestResourceValidation.go.html to see an example of how to use RequestResourceValidationRequest. type RequestResourceValidationRequest struct { - // Details for requesting resource validation + // Details for requesting resource validation. RequestResourceValidationDetails `contributesTo:"body"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_details.go index 2cbdcd5c305..01fdd705740 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,13 +15,13 @@ import ( "strings" ) -// RequestTargetDiscoveryDetails Request to initiate target discovery +// RequestTargetDiscoveryDetails Request to initiate target discovery. type RequestTargetDiscoveryDetails struct { - // A boolean flag which decides if all resources within the fleet should be part of discovery. + // A boolean flag that decides if all resources within the fleet should be part of discovery. IsApplicableToAllResources *bool `mandatory:"false" json:"isApplicableToAllResources"` - // Resource OCIDS that need to be included for discovery. + // Resource OCIDS to be included for discovery. ResourceIds []string `mandatory:"false" json:"resourceIds"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_request_response.go index a38f6a149c0..8dd577cf36e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/request_target_discovery_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/RequestTargetDiscovery.go.html to see an example of how to use RequestTargetDiscoveryRequest. type RequestTargetDiscoveryRequest struct { - // Details for requesting target discovery + // Details for requesting target discovery. RequestTargetDiscoveryDetails `contributesTo:"body"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // A token that uniquely identifies a request so it can be retried in case of a timeout or diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_collection.go new file mode 100644 index 00000000000..2abd5c7056d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResourceCollection Results of a ResourceSummary Search. +type ResourceCollection struct { + + // List of Execution Resources. + Items []ResourceSummary `mandatory:"true" json:"items"` +} + +func (m ResourceCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ResourceCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_credential_entity_specific_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_credential_entity_specific_details.go new file mode 100644 index 00000000000..73f255f5a22 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_credential_entity_specific_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResourceCredentialEntitySpecificDetails Resource credential details. +type ResourceCredentialEntitySpecificDetails struct { + + // OCID of the resource for which the credential is created. + ResourceId *string `mandatory:"true" json:"resourceId"` +} + +func (m ResourceCredentialEntitySpecificDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ResourceCredentialEntitySpecificDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m ResourceCredentialEntitySpecificDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeResourceCredentialEntitySpecificDetails ResourceCredentialEntitySpecificDetails + s := struct { + DiscriminatorParam string `json:"credentialLevel"` + MarshalTypeResourceCredentialEntitySpecificDetails + }{ + "RESOURCE", + (MarshalTypeResourceCredentialEntitySpecificDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_summary.go new file mode 100644 index 00000000000..fefb7a23a17 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_summary.go @@ -0,0 +1,64 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// ResourceSummary Execution Resource Summary +type ResourceSummary struct { + + // Resource Identifier associated with the Work Request. + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Status of the Job at Resource Level. + Status JobStatusEnum `mandatory:"true" json:"status"` + + // Resource Display Name. + ResourceDisplayName *string `mandatory:"false" json:"resourceDisplayName"` + + // Description of the Resource Execution status. + // If there are any errors, this can also include a short error message. + Description *string `mandatory:"false" json:"description"` + + // The sequence of the Resource. + Sequence *string `mandatory:"false" json:"sequence"` + + // Targets associated with the resource. + Targets []ActivityResourceTarget `mandatory:"false" json:"targets"` + + // The time the task started for the resource. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the task ended for the resource. An RFC3339 formatted datetime string + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` +} + +func (m ResourceSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m ResourceSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJobStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetJobStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_check_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_check_details.go index 70ce7120986..f795984fc91 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_check_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_check_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// ResourceTagCheckDetails Request to check resource tagging +// ResourceTagCheckDetails Request to check resource tagging. type ResourceTagCheckDetails struct { - // Tag enablement Information for resources. + // Tag enablement Information for the resources. TagEnablementInfo []ResourceTagEnablementInfo `mandatory:"true" json:"tagEnablementInfo"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_enablement_info.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_enablement_info.go index 00171f46edc..ee5a42179a0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_enablement_info.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/resource_tag_enablement_info.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,13 +15,13 @@ import ( "strings" ) -// ResourceTagEnablementInfo Resource tag enablement Information +// ResourceTagEnablementInfo Resource tag enablement Information. type ResourceTagEnablementInfo struct { // The OCID of the resource. ResourceId *string `mandatory:"true" json:"resourceId"` - // A value which represents if resource can be tagged with Fleet name + // A value that represents if the resource can be tagged with a Fleet name. IsTaggingPossible *bool `mandatory:"true" json:"isTaggingPossible"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rollback_workflow_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rollback_workflow_details.go new file mode 100644 index 00000000000..1edb32582f1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rollback_workflow_details.go @@ -0,0 +1,87 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// RollbackWorkflowDetails Rollback Workflow details. +type RollbackWorkflowDetails struct { + + // rollback Scope + Scope RollbackWorkflowDetailsScopeEnum `mandatory:"true" json:"scope"` + + // Rollback Workflow for the runbook. + Workflow []WorkflowGroup `mandatory:"true" json:"workflow"` +} + +func (m RollbackWorkflowDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m RollbackWorkflowDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingRollbackWorkflowDetailsScopeEnum(string(m.Scope)); !ok && m.Scope != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Scope: %s. Supported values are: %s.", m.Scope, strings.Join(GetRollbackWorkflowDetailsScopeEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// RollbackWorkflowDetailsScopeEnum Enum with underlying type: string +type RollbackWorkflowDetailsScopeEnum string + +// Set of constants representing the allowable values for RollbackWorkflowDetailsScopeEnum +const ( + RollbackWorkflowDetailsScopeActionGroup RollbackWorkflowDetailsScopeEnum = "ACTION_GROUP" + RollbackWorkflowDetailsScopeTarget RollbackWorkflowDetailsScopeEnum = "TARGET" +) + +var mappingRollbackWorkflowDetailsScopeEnum = map[string]RollbackWorkflowDetailsScopeEnum{ + "ACTION_GROUP": RollbackWorkflowDetailsScopeActionGroup, + "TARGET": RollbackWorkflowDetailsScopeTarget, +} + +var mappingRollbackWorkflowDetailsScopeEnumLowerCase = map[string]RollbackWorkflowDetailsScopeEnum{ + "action_group": RollbackWorkflowDetailsScopeActionGroup, + "target": RollbackWorkflowDetailsScopeTarget, +} + +// GetRollbackWorkflowDetailsScopeEnumValues Enumerates the set of values for RollbackWorkflowDetailsScopeEnum +func GetRollbackWorkflowDetailsScopeEnumValues() []RollbackWorkflowDetailsScopeEnum { + values := make([]RollbackWorkflowDetailsScopeEnum, 0) + for _, v := range mappingRollbackWorkflowDetailsScopeEnum { + values = append(values, v) + } + return values +} + +// GetRollbackWorkflowDetailsScopeEnumStringValues Enumerates the set of values in String for RollbackWorkflowDetailsScopeEnum +func GetRollbackWorkflowDetailsScopeEnumStringValues() []string { + return []string{ + "ACTION_GROUP", + "TARGET", + } +} + +// GetMappingRollbackWorkflowDetailsScopeEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingRollbackWorkflowDetailsScopeEnum(val string) (RollbackWorkflowDetailsScopeEnum, bool) { + enum, ok := mappingRollbackWorkflowDetailsScopeEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rule.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rule.go index 2c2fbc061bd..df7044b9894 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/rule.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,19 +15,23 @@ import ( "strings" ) -// Rule Rule Selection Criteria +// Rule Rule for DYNAMIC selection. type Rule struct { - // Please provide the root compartmentId (TenancyId). + // Tenancy Id (Root Compartment Id)for which the rule is created. CompartmentId *string `mandatory:"true" json:"compartmentId"` - // Resource Compartment Id.Provide the compartmentId the resource belongs to. + // The Compartment ID to dynamically search resources. + // Provide the compartment ID to which the rule is applicable. ResourceCompartmentId *string `mandatory:"true" json:"resourceCompartmentId"` // Rule Conditions Conditions []Condition `mandatory:"true" json:"conditions"` - // Rule to be be applied on. + // Based on what the rule is created. + // It can be based on a resourceProperty or a tag. + // If based on a tag, basis will be 'definedTagEquals' + // If based on a resource property, basis will be 'inventoryProperties' Basis *string `mandatory:"false" json:"basis"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook.go index 0a14f253096..e4c8a2c48b7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,6 +16,7 @@ import ( ) // Runbook Runbook definition. +// Runbooks allow you to capture procedural tasks for handling a workflow. type Runbook struct { // The OCID of the resource. @@ -30,10 +30,10 @@ type Runbook struct { // The type of the runbook. Type RunbookTypeEnum `mandatory:"true" json:"type"` - // Type of runbook structure. + // Relevance of the runbook. RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"true" json:"runbookRelevance"` - // The lifecycle operation performed by the task. + // The lifecycle operation performed by the runbook. Operation *string `mandatory:"true" json:"operation"` // The OS type for the runbook. @@ -43,6 +43,7 @@ type Runbook struct { Platform *string `mandatory:"true" json:"platform"` // Is the runbook default? + // Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. IsDefault *bool `mandatory:"true" json:"isDefault"` // The current state of the Runbook. @@ -61,7 +62,7 @@ type Runbook struct { // Avoid entering confidential information. Description *string `mandatory:"false" json:"description"` - // Estimated time to successfully complete the runbook execution + // Estimated time to successfully complete the runbook execution. EstimatedTime *string `mandatory:"false" json:"estimatedTime"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. @@ -206,21 +207,33 @@ type RunbookLifecycleStateEnum string // Set of constants representing the allowable values for RunbookLifecycleStateEnum const ( - RunbookLifecycleStateActive RunbookLifecycleStateEnum = "ACTIVE" - RunbookLifecycleStateDeleted RunbookLifecycleStateEnum = "DELETED" - RunbookLifecycleStateFailed RunbookLifecycleStateEnum = "FAILED" + RunbookLifecycleStateActive RunbookLifecycleStateEnum = "ACTIVE" + RunbookLifecycleStateDeleted RunbookLifecycleStateEnum = "DELETED" + RunbookLifecycleStateFailed RunbookLifecycleStateEnum = "FAILED" + RunbookLifecycleStateInactive RunbookLifecycleStateEnum = "INACTIVE" + RunbookLifecycleStateCreating RunbookLifecycleStateEnum = "CREATING" + RunbookLifecycleStateDeleting RunbookLifecycleStateEnum = "DELETING" + RunbookLifecycleStateUpdating RunbookLifecycleStateEnum = "UPDATING" ) var mappingRunbookLifecycleStateEnum = map[string]RunbookLifecycleStateEnum{ - "ACTIVE": RunbookLifecycleStateActive, - "DELETED": RunbookLifecycleStateDeleted, - "FAILED": RunbookLifecycleStateFailed, + "ACTIVE": RunbookLifecycleStateActive, + "DELETED": RunbookLifecycleStateDeleted, + "FAILED": RunbookLifecycleStateFailed, + "INACTIVE": RunbookLifecycleStateInactive, + "CREATING": RunbookLifecycleStateCreating, + "DELETING": RunbookLifecycleStateDeleting, + "UPDATING": RunbookLifecycleStateUpdating, } var mappingRunbookLifecycleStateEnumLowerCase = map[string]RunbookLifecycleStateEnum{ - "active": RunbookLifecycleStateActive, - "deleted": RunbookLifecycleStateDeleted, - "failed": RunbookLifecycleStateFailed, + "active": RunbookLifecycleStateActive, + "deleted": RunbookLifecycleStateDeleted, + "failed": RunbookLifecycleStateFailed, + "inactive": RunbookLifecycleStateInactive, + "creating": RunbookLifecycleStateCreating, + "deleting": RunbookLifecycleStateDeleting, + "updating": RunbookLifecycleStateUpdating, } // GetRunbookLifecycleStateEnumValues Enumerates the set of values for RunbookLifecycleStateEnum @@ -238,6 +251,10 @@ func GetRunbookLifecycleStateEnumStringValues() []string { "ACTIVE", "DELETED", "FAILED", + "INACTIVE", + "CREATING", + "DELETING", + "UPDATING", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_collection.go index 499f1f728b9..9783bf5d66f 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// RunbookCollection Results of a runbook search. Contains boh RunbookSummary items and other information, such as metadata. +// RunbookCollection Results of a runbook search. Contains RunbookSummary items and other information, such as metadata. type RunbookCollection struct { // List of runbooks. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_summary.go index ab12cc7c259..03cc1b7dc22 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/runbook_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -33,7 +32,7 @@ type RunbookSummary struct { // Type of runbook structure. RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"true" json:"runbookRelevance"` - // The lifecycle operation performed by the task. + // The lifecycle operation performed by the runbook. Operation *string `mandatory:"true" json:"operation"` // The OS type for the runbook. @@ -43,6 +42,7 @@ type RunbookSummary struct { Platform *string `mandatory:"true" json:"platform"` // Is the runbook default? + // Sets this runbook as the default for the chosen product/product stack for the specified lifecycle operation. IsDefault *bool `mandatory:"true" json:"isDefault"` // The current state of the Runbook. @@ -61,7 +61,7 @@ type RunbookSummary struct { // Avoid entering confidential information. Description *string `mandatory:"false" json:"description"` - // Estimated time to successfully complete the runbook execution + // Estimated time to successfully complete the runbook execution. EstimatedTime *string `mandatory:"false" json:"estimatedTime"` // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/schedule.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/schedule.go index c5010cfce18..ca026a2de49 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/schedule.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/schedule.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_collection.go index e4e82f5711f..9cc390a41d5 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_summary.go index ae68bf9e176..cf9183b39f7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduled_fleet_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition.go index c0c38acf2c1..b0b707553e3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -46,10 +45,10 @@ type SchedulerDefinition struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Scheduled date for the next run of the Job. + // The scheduled date for the next run of the Job. TimeOfNextRun *common.SDKTime `mandatory:"false" json:"timeOfNextRun"` - // Activity Initiation Cut Off + // Activity Initiation Cut Off. ActivityInitiationCutOff *int `mandatory:"false" json:"activityInitiationCutOff"` Schedule *Schedule `mandatory:"false" json:"schedule"` @@ -57,22 +56,22 @@ type SchedulerDefinition struct { // Count of Action Groups affected by the Schedule. CountOfAffectedActionGroups *int `mandatory:"false" json:"countOfAffectedActionGroups"` - // Count of Resources affected by the Schedule + // Count of Resources affected by the Schedule. CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` - // Count of Targets affected by the Schedule + // Count of Targets affected by the Schedule. CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` - // All ActionGroup Types part of the schedule. + // All ActionGroup Types that are part of the schedule. ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` - // All application types part of the schedule for ENVIRONMENT ActionGroup Type. + // All application types that are part of the schedule for ENVIRONMENT ActionGroup Type. ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` - // All products part of the schedule for PRODUCT ActionGroup Type. + // All products that are part of the schedule for PRODUCT ActionGroup Type. Products []string `mandatory:"false" json:"products"` - // All LifeCycle Operations part of the schedule + // All LifeCycle Operations that are part of the schedule. LifecycleOperations []string `mandatory:"false" json:"lifecycleOperations"` // Action Groups associated with the Schedule. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_collection.go index 7bf4c59830f..c05902e98cf 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_summary.go index 4932a898025..9acc16f12e4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_definition_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job.go index 932a301bc70..030dc72a46e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -47,34 +46,36 @@ type SchedulerJob struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Scheduled date for the Job. + // The scheduled date and time for the Job. TimeScheduled *common.SDKTime `mandatory:"false" json:"timeScheduled"` - // Actual Start time for the Job + // Actual start date and time for the Job. TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` - // Actual End time for the Job + // Actual end date and time for the Job. TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` - // Count of ActionGroups affected by the Schedule. + // Count of Action Groups affected by the Schedule. + // An action group is a group of entities grouped for a lifecycle activity. + // Example - A Fleet will be considered an Action Group for any lifecycle activity. CountOfAffectedActionGroups *int `mandatory:"false" json:"countOfAffectedActionGroups"` - // Count of Resources affected by the Schedule + // Count of resources affected by the schedule. CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` - // Count of Targets affected by the Schedule + // Count of targets affected by the schedule. CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` - // All ActionGroup Types part of the schedule. + // All Action Group types are part of the schedule. ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` - // All application types part of the schedule for ENVIRONMENT ActionGroup Type. + // All application types that are part of the schedule for an ENVIRONMENT action group Type. ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` - // All products part of the schedule for PRODUCT AcionGroup Type. + // All products that are part of the schedule for a PRODUCT action group type. Products []string `mandatory:"false" json:"products"` - // All LifeCycle Operations part of the schedule + // All LifeCycle Operations that are part of the schedule. LifecycleOperations []string `mandatory:"false" json:"lifecycleOperations"` // Action Groups associated with the Schedule. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation.go new file mode 100644 index 00000000000..4452b437c0f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation.go @@ -0,0 +1,41 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerJobAggregation Aggregated summary information for SchedulerJob. +type SchedulerJobAggregation struct { + + // Count of jobs in a Tenancy. + Count *int `mandatory:"true" json:"count"` + + Dimensions *SchedulerJobDimension `mandatory:"true" json:"dimensions"` +} + +func (m SchedulerJobAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchedulerJobAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation_collection.go new file mode 100644 index 00000000000..5b9e179df53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_aggregation_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerJobAggregationCollection An array of SchedulerJob objects. +type SchedulerJobAggregationCollection struct { + + // List of SchedulerJobAggregation objects. + Items []SchedulerJobAggregation `mandatory:"true" json:"items"` +} + +func (m SchedulerJobAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchedulerJobAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_collection.go index cdb66ea5e08..9b366019fd9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// SchedulerJobCollection Results of a schedulerJob search. Contains boh SchedulerJobSummary items and other information, such as metadata. +// SchedulerJobCollection Results of a schedulerJob search. Contains SchedulerJobSummary items and other information, such as metadata. type SchedulerJobCollection struct { // List of schedulerJobs. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_dimension.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_dimension.go new file mode 100644 index 00000000000..ad7d9c521e4 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_dimension.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SchedulerJobDimension Aggregated summary information for a SchedulerJob. +type SchedulerJobDimension struct { + + // A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state. + LifecycleDetails *string `mandatory:"true" json:"lifecycleDetails"` +} + +func (m SchedulerJobDimension) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SchedulerJobDimension) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_summary.go index ee66c909328..7ad61fcfc4b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scheduler_job_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -47,28 +46,30 @@ type SchedulerJobSummary struct { // The time this resource was last updated. An RFC3339 formatted datetime string. TimeUpdated *common.SDKTime `mandatory:"false" json:"timeUpdated"` - // Scheduled date for the Job.Provide only the date + // The scheduled date and time for the Job. TimeScheduled *common.SDKTime `mandatory:"false" json:"timeScheduled"` - // Count of ActionGroups affected by the Schedule. + // Count of Action Groups affected by the Schedule. + // An action group is a group of entities grouped for a lifecycle activity. + // Example - A Fleet will be considered an Action Group for any lifecycle activity. CountOfAffectedActionGroups *int `mandatory:"false" json:"countOfAffectedActionGroups"` - // Count of Resources affected by the Schedule + // Count of resources affected by the schedule. CountOfAffectedResources *int `mandatory:"false" json:"countOfAffectedResources"` - // Count of Targets affected by the Schedule + // Count of targets affected by the schedule. CountOfAffectedTargets *int `mandatory:"false" json:"countOfAffectedTargets"` - // All ActionGroup Types part of the schedule. + // All Action Group types are part of the schedule. ActionGroupTypes []LifeCycleActionGroupTypeEnum `mandatory:"false" json:"actionGroupTypes,omitempty"` - // All application types part of the schedule for ENVIRONMENT ActionGroup Type. + // All application types that are part of the schedule for an ENVIRONMENT action group Type. ApplicationTypes []string `mandatory:"false" json:"applicationTypes"` - // All products part of the schedule for PRODUCT ActionGroup Type. + // All products that are part of the schedule for a PRODUCT action group type. Products []string `mandatory:"false" json:"products"` - // All LifeCycle Operations part of the schedule + // All LifeCycle Operations that are part of the schedule. LifecycleOperations []string `mandatory:"false" json:"lifecycleOperations"` // Action Groups associated with the Schedule. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scope.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scope.go index 7689b33b97f..8d5d350d426 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scope.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/scope.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/script_based_execution_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/script_based_execution_details.go index 37fbb947677..5c1d03f636b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/script_based_execution_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/script_based_execution_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,14 +16,18 @@ import ( "strings" ) -// ScriptBasedExecutionDetails Details for script based execution +// ScriptBasedExecutionDetails Details for script-based execution. type ScriptBasedExecutionDetails struct { Variables *TaskVariable `mandatory:"false" json:"variables"` Content ContentDetails `mandatory:"false" json:"content"` - // Optional Command to execute the content. + // Optional command to execute the content. + // You can provide any commands/arguments that can't be part of the script. Command *string `mandatory:"false" json:"command"` + + // Credentials required for executing the task. + Credentials []ConfigAssociationDetails `mandatory:"false" json:"credentials"` } func (m ScriptBasedExecutionDetails) String() string { @@ -60,9 +63,10 @@ func (m ScriptBasedExecutionDetails) MarshalJSON() (buff []byte, e error) { // UnmarshalJSON unmarshals from json func (m *ScriptBasedExecutionDetails) UnmarshalJSON(data []byte) (e error) { model := struct { - Variables *TaskVariable `json:"variables"` - Content contentdetails `json:"content"` - Command *string `json:"command"` + Variables *TaskVariable `json:"variables"` + Content contentdetails `json:"content"` + Command *string `json:"command"` + Credentials []ConfigAssociationDetails `json:"credentials"` }{} e = json.Unmarshal(data, &model) @@ -84,5 +88,7 @@ func (m *ScriptBasedExecutionDetails) UnmarshalJSON(data []byte) (e error) { m.Command = model.Command + m.Credentials = make([]ConfigAssociationDetails, len(model.Credentials)) + copy(m.Credentials, model.Credentials) return } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection.go index bb99c9a6188..3773cad7c2c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection_criteria.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection_criteria.go index ca1a3a8be0d..66356b8f1f7 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection_criteria.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/selection_criteria.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,12 @@ import ( "strings" ) -// SelectionCriteria Rule Selection Criteria +// SelectionCriteria Rule Selection Criteria for DYNAMIC resource selection for a GENERIC fleet. +// Rules define what resources are members of this fleet. All resources that meet the criteria are added automatically. type SelectionCriteria struct { - // Rule selection match condition. + // Match condition for the rule selection. + // Include resources that match all rules or any of the rules. MatchCondition SelectionCriteriaMatchConditionEnum `mandatory:"true" json:"matchCondition"` // Rules. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_details.go new file mode 100644 index 00000000000..332f8ceaad7 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_details.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SetDefaultRunbookDetails Request to set default Runbook +type SetDefaultRunbookDetails struct { + + // The OCID of the resource. + RunbookId *string `mandatory:"true" json:"runbookId"` +} + +func (m SetDefaultRunbookDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SetDefaultRunbookDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_request_response.go new file mode 100644 index 00000000000..8c09217cf93 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/set_default_runbook_request_response.go @@ -0,0 +1,107 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SetDefaultRunbookRequest wrapper for the SetDefaultRunbook operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SetDefaultRunbook.go.html to see an example of how to use SetDefaultRunbookRequest. +type SetDefaultRunbookRequest struct { + + // Details for setting the Runbook as default. + SetDefaultRunbookDetails `contributesTo:"body"` + + // A token that uniquely identifies a request so it can be retried in case of a timeout or + // server error without risk of executing that same action again. Retry tokens expire after 24 + // hours, but can be invalidated before then due to conflicting operations. For example, if a resource + // has been deleted and purged from the system, then a retry of the original creation request + // might be rejected. + OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SetDefaultRunbookRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SetDefaultRunbookRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SetDefaultRunbookRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SetDefaultRunbookRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SetDefaultRunbookRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SetDefaultRunbookResponse wrapper for the SetDefaultRunbook operation +type SetDefaultRunbookResponse struct { + + // The underlying http response + RawResponse *http.Response + + // The Runbook instance + Runbook `presentIn:"body"` + + // For optimistic concurrency control. See `if-match`. + Etag *string `presentIn:"header" name:"etag"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response SetDefaultRunbookResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SetDefaultRunbookResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/sort_order.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/sort_order.go index 459c720849e..5e682433037 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/sort_order.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/sort_order.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_based_user_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_based_user_action_details.go new file mode 100644 index 00000000000..39f0ea6c565 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_based_user_action_details.go @@ -0,0 +1,74 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StepBasedUserActionDetails Details for a user action to be performed on a step. +type StepBasedUserActionDetails struct { + + // Unique identifier for the action group. + ActionGroupId *string `mandatory:"true" json:"actionGroupId"` + + // Resource OCID + ResourceId *string `mandatory:"true" json:"resourceId"` + + // Name of the step on which user action needs to be performed. + StepName *string `mandatory:"true" json:"stepName"` + + // Target associated with the execution. + TargetId *string `mandatory:"false" json:"targetId"` + + // Action to be Performed. + Action UserActionDetailsActionEnum `mandatory:"true" json:"action"` +} + +// GetAction returns Action +func (m StepBasedUserActionDetails) GetAction() UserActionDetailsActionEnum { + return m.Action +} + +func (m StepBasedUserActionDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m StepBasedUserActionDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingUserActionDetailsActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetUserActionDetailsActionEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m StepBasedUserActionDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeStepBasedUserActionDetails StepBasedUserActionDetails + s := struct { + DiscriminatorParam string `json:"level"` + MarshalTypeStepBasedUserActionDetails + }{ + "STEP_NAME", + (MarshalTypeStepBasedUserActionDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_collection.go new file mode 100644 index 00000000000..a7da1a656ec --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_collection.go @@ -0,0 +1,39 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StepCollection Results of a StepSummary search. +type StepCollection struct { + + // List of Execution steps. + Items []StepSummary `mandatory:"true" json:"items"` +} + +func (m StepCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m StepCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_summary.go new file mode 100644 index 00000000000..0b3bd1aa32d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/step_summary.go @@ -0,0 +1,67 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// StepSummary Task associated with the Job. +type StepSummary struct { + + // Name of the Step + StepName *string `mandatory:"true" json:"stepName"` + + // Status of the Task + Status JobStatusEnum `mandatory:"true" json:"status"` + + // The OCID of taskRecord assocaited with the step + TaskRecordId *string `mandatory:"false" json:"taskRecordId"` + + // The sequence of the step + Sequence *string `mandatory:"false" json:"sequence"` + + // The time the task started. An RFC3339 formatted datetime string + TimeStarted *common.SDKTime `mandatory:"false" json:"timeStarted"` + + // The time the task ended. An RFC3339 formatted datetime string + TimeEnded *common.SDKTime `mandatory:"false" json:"timeEnded"` + + // Is this a rollback task? + IsRollbackTask *bool `mandatory:"false" json:"isRollbackTask"` + + // Description of the step Execution + Description *string `mandatory:"false" json:"description"` + + // System tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"orcl-cloud": {"free-tier-retained": "true"}}` + SystemTags map[string]map[string]interface{} `mandatory:"false" json:"systemTags"` +} + +func (m StepSummary) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m StepSummary) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingJobStatusEnum(string(m.Status)); !ok && m.Status != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", m.Status, strings.Join(GetJobStatusEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/string_input_argument.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/string_input_argument.go index 2a8a1b7a1de..65cf841abfc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/string_input_argument.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/string_input_argument.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -20,7 +19,7 @@ import ( // StringInputArgument The details of the String Input argument. type StringInputArgument struct { - // The name of the argument + // The name of the argument. Name *string `mandatory:"true" json:"name"` // The description of the argument. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_compliance_record_counts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_compliance_record_counts_request_response.go new file mode 100644 index 00000000000..f065c75e5ae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_compliance_record_counts_request_response.go @@ -0,0 +1,149 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeComplianceRecordCountsRequest wrapper for the SummarizeComplianceRecordCounts operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SummarizeComplianceRecordCounts.go.html to see an example of how to use SummarizeComplianceRecordCountsRequest. +type SummarizeComplianceRecordCountsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder SummarizeComplianceRecordCountsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SummarizeComplianceRecordCountsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeComplianceRecordCountsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SummarizeComplianceRecordCountsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeComplianceRecordCountsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SummarizeComplianceRecordCountsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeComplianceRecordCountsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetSummarizeComplianceRecordCountsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeComplianceRecordCountsResponse wrapper for the SummarizeComplianceRecordCounts operation +type SummarizeComplianceRecordCountsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ComplianceRecordAggregationCollection instances + ComplianceRecordAggregationCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SummarizeComplianceRecordCountsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeComplianceRecordCountsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeComplianceRecordCountsSortOrderEnum Enum with underlying type: string +type SummarizeComplianceRecordCountsSortOrderEnum string + +// Set of constants representing the allowable values for SummarizeComplianceRecordCountsSortOrderEnum +const ( + SummarizeComplianceRecordCountsSortOrderAsc SummarizeComplianceRecordCountsSortOrderEnum = "ASC" + SummarizeComplianceRecordCountsSortOrderDesc SummarizeComplianceRecordCountsSortOrderEnum = "DESC" +) + +var mappingSummarizeComplianceRecordCountsSortOrderEnum = map[string]SummarizeComplianceRecordCountsSortOrderEnum{ + "ASC": SummarizeComplianceRecordCountsSortOrderAsc, + "DESC": SummarizeComplianceRecordCountsSortOrderDesc, +} + +var mappingSummarizeComplianceRecordCountsSortOrderEnumLowerCase = map[string]SummarizeComplianceRecordCountsSortOrderEnum{ + "asc": SummarizeComplianceRecordCountsSortOrderAsc, + "desc": SummarizeComplianceRecordCountsSortOrderDesc, +} + +// GetSummarizeComplianceRecordCountsSortOrderEnumValues Enumerates the set of values for SummarizeComplianceRecordCountsSortOrderEnum +func GetSummarizeComplianceRecordCountsSortOrderEnumValues() []SummarizeComplianceRecordCountsSortOrderEnum { + values := make([]SummarizeComplianceRecordCountsSortOrderEnum, 0) + for _, v := range mappingSummarizeComplianceRecordCountsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeComplianceRecordCountsSortOrderEnumStringValues Enumerates the set of values in String for SummarizeComplianceRecordCountsSortOrderEnum +func GetSummarizeComplianceRecordCountsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSummarizeComplianceRecordCountsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeComplianceRecordCountsSortOrderEnum(val string) (SummarizeComplianceRecordCountsSortOrderEnum, bool) { + enum, ok := mappingSummarizeComplianceRecordCountsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_managed_entity_counts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_managed_entity_counts_request_response.go new file mode 100644 index 00000000000..ff635313837 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_managed_entity_counts_request_response.go @@ -0,0 +1,149 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeManagedEntityCountsRequest wrapper for the SummarizeManagedEntityCounts operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SummarizeManagedEntityCounts.go.html to see an example of how to use SummarizeManagedEntityCountsRequest. +type SummarizeManagedEntityCountsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder SummarizeManagedEntityCountsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SummarizeManagedEntityCountsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeManagedEntityCountsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SummarizeManagedEntityCountsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeManagedEntityCountsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SummarizeManagedEntityCountsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeManagedEntityCountsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetSummarizeManagedEntityCountsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeManagedEntityCountsResponse wrapper for the SummarizeManagedEntityCounts operation +type SummarizeManagedEntityCountsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of ManagedEntityAggregationCollection instances + ManagedEntityAggregationCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SummarizeManagedEntityCountsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeManagedEntityCountsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeManagedEntityCountsSortOrderEnum Enum with underlying type: string +type SummarizeManagedEntityCountsSortOrderEnum string + +// Set of constants representing the allowable values for SummarizeManagedEntityCountsSortOrderEnum +const ( + SummarizeManagedEntityCountsSortOrderAsc SummarizeManagedEntityCountsSortOrderEnum = "ASC" + SummarizeManagedEntityCountsSortOrderDesc SummarizeManagedEntityCountsSortOrderEnum = "DESC" +) + +var mappingSummarizeManagedEntityCountsSortOrderEnum = map[string]SummarizeManagedEntityCountsSortOrderEnum{ + "ASC": SummarizeManagedEntityCountsSortOrderAsc, + "DESC": SummarizeManagedEntityCountsSortOrderDesc, +} + +var mappingSummarizeManagedEntityCountsSortOrderEnumLowerCase = map[string]SummarizeManagedEntityCountsSortOrderEnum{ + "asc": SummarizeManagedEntityCountsSortOrderAsc, + "desc": SummarizeManagedEntityCountsSortOrderDesc, +} + +// GetSummarizeManagedEntityCountsSortOrderEnumValues Enumerates the set of values for SummarizeManagedEntityCountsSortOrderEnum +func GetSummarizeManagedEntityCountsSortOrderEnumValues() []SummarizeManagedEntityCountsSortOrderEnum { + values := make([]SummarizeManagedEntityCountsSortOrderEnum, 0) + for _, v := range mappingSummarizeManagedEntityCountsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeManagedEntityCountsSortOrderEnumStringValues Enumerates the set of values in String for SummarizeManagedEntityCountsSortOrderEnum +func GetSummarizeManagedEntityCountsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSummarizeManagedEntityCountsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeManagedEntityCountsSortOrderEnum(val string) (SummarizeManagedEntityCountsSortOrderEnum, bool) { + enum, ok := mappingSummarizeManagedEntityCountsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_scheduler_job_counts_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_scheduler_job_counts_request_response.go new file mode 100644 index 00000000000..302b8179af9 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/summarize_scheduler_job_counts_request_response.go @@ -0,0 +1,149 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeSchedulerJobCountsRequest wrapper for the SummarizeSchedulerJobCounts operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/SummarizeSchedulerJobCounts.go.html to see an example of how to use SummarizeSchedulerJobCountsRequest. +type SummarizeSchedulerJobCountsRequest struct { + + // The ID of the compartment in which to list resources. + CompartmentId *string `mandatory:"false" contributesTo:"query" name:"compartmentId"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // The maximum number of items to return. + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // The sort order to use, either 'ASC' or 'DESC'. + SortOrder SummarizeSchedulerJobCountsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SummarizeSchedulerJobCountsRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeSchedulerJobCountsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SummarizeSchedulerJobCountsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeSchedulerJobCountsRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SummarizeSchedulerJobCountsRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeSchedulerJobCountsSortOrderEnum(string(request.SortOrder)); !ok && request.SortOrder != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for SortOrder: %s. Supported values are: %s.", request.SortOrder, strings.Join(GetSummarizeSchedulerJobCountsSortOrderEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeSchedulerJobCountsResponse wrapper for the SummarizeSchedulerJobCounts operation +type SummarizeSchedulerJobCountsResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SchedulerJobAggregationCollection instances + SchedulerJobAggregationCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SummarizeSchedulerJobCountsResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeSchedulerJobCountsResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeSchedulerJobCountsSortOrderEnum Enum with underlying type: string +type SummarizeSchedulerJobCountsSortOrderEnum string + +// Set of constants representing the allowable values for SummarizeSchedulerJobCountsSortOrderEnum +const ( + SummarizeSchedulerJobCountsSortOrderAsc SummarizeSchedulerJobCountsSortOrderEnum = "ASC" + SummarizeSchedulerJobCountsSortOrderDesc SummarizeSchedulerJobCountsSortOrderEnum = "DESC" +) + +var mappingSummarizeSchedulerJobCountsSortOrderEnum = map[string]SummarizeSchedulerJobCountsSortOrderEnum{ + "ASC": SummarizeSchedulerJobCountsSortOrderAsc, + "DESC": SummarizeSchedulerJobCountsSortOrderDesc, +} + +var mappingSummarizeSchedulerJobCountsSortOrderEnumLowerCase = map[string]SummarizeSchedulerJobCountsSortOrderEnum{ + "asc": SummarizeSchedulerJobCountsSortOrderAsc, + "desc": SummarizeSchedulerJobCountsSortOrderDesc, +} + +// GetSummarizeSchedulerJobCountsSortOrderEnumValues Enumerates the set of values for SummarizeSchedulerJobCountsSortOrderEnum +func GetSummarizeSchedulerJobCountsSortOrderEnumValues() []SummarizeSchedulerJobCountsSortOrderEnum { + values := make([]SummarizeSchedulerJobCountsSortOrderEnum, 0) + for _, v := range mappingSummarizeSchedulerJobCountsSortOrderEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeSchedulerJobCountsSortOrderEnumStringValues Enumerates the set of values in String for SummarizeSchedulerJobCountsSortOrderEnum +func GetSummarizeSchedulerJobCountsSortOrderEnumStringValues() []string { + return []string{ + "ASC", + "DESC", + } +} + +// GetMappingSummarizeSchedulerJobCountsSortOrderEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeSchedulerJobCountsSortOrderEnum(val string) (SummarizeSchedulerJobCountsSortOrderEnum, bool) { + enum, ok := mappingSummarizeSchedulerJobCountsSortOrderEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_credential_entity_specific_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_credential_entity_specific_details.go index 4b925d210c1..2e16d8611be 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_credential_entity_specific_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_credential_entity_specific_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,13 +16,13 @@ import ( "strings" ) -// TargetCredentialEntitySpecificDetails Fleet Credential Specific Details. +// TargetCredentialEntitySpecificDetails Target credential details. type TargetCredentialEntitySpecificDetails struct { - // OCID of the resource associated with the target for which credential is created + // OCID of the resource associated with the target for which the credential is created. ResourceId *string `mandatory:"true" json:"resourceId"` - // Target associated with the Credential + // Target name for which the credential is provided. Target *string `mandatory:"true" json:"target"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_resource.go index d405a164add..d4e81a9f9fb 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/target_resource.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// TargetResource Resource Information for the Target +// TargetResource Resource Information for the Target. type TargetResource struct { // The OCID of the resource. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task.go index 43cbf1d9b7e..7d6cf63044e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_argument.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_argument.go index d0ea87ac569..ad577018255 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_argument.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_argument.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_execution_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_execution_type.go index d831b6805e0..f418544d845 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_execution_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_execution_type.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_notification_preferences.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_notification_preferences.go new file mode 100644 index 00000000000..e63b6a45172 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_notification_preferences.go @@ -0,0 +1,45 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TaskNotificationPreferences Preferences to send notifications on the task activities. +type TaskNotificationPreferences struct { + + // Enables notification on pause. + ShouldNotifyOnPause *bool `mandatory:"false" json:"shouldNotifyOnPause"` + + // Enables or disables notification on Task Failures. + ShouldNotifyOnTaskFailure *bool `mandatory:"false" json:"shouldNotifyOnTaskFailure"` + + // Enables or disables notification on Task Success. + ShouldNotifyOnTaskSuccess *bool `mandatory:"false" json:"shouldNotifyOnTaskSuccess"` +} + +func (m TaskNotificationPreferences) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TaskNotificationPreferences) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record.go index 5e3c4e3edec..c48619a4370 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// TaskRecord Description of TaskRecord. +// TaskRecord Details of a task. type TaskRecord struct { // The OCID of the resource. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_collection.go index 944a5dfc38c..7021d20ca1b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_summary.go index d7e858f2de8..850e7180fea 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_record_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_scope.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_scope.go index 63b0206f674..82d20659b2c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_scope.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_scope.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_variable.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_variable.go index b61eaa91776..74071506161 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_variable.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/task_variable.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -17,7 +16,8 @@ import ( "strings" ) -// TaskVariable The variable of the task.Atleast one of dynamicArguments or output needs to be provided. +// TaskVariable The variable of the task. +// At least one of the dynamicArguments or output needs to be provided. type TaskVariable struct { // The input variables for the task. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/time_based_pause_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/time_based_pause_details.go new file mode 100644 index 00000000000..91983b0be53 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/time_based_pause_details.go @@ -0,0 +1,54 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// TimeBasedPauseDetails Time-based pause details. +type TimeBasedPauseDetails struct { + + // Time in minutes to apply Pause. + DurationInMinutes *int `mandatory:"true" json:"durationInMinutes"` +} + +func (m TimeBasedPauseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m TimeBasedPauseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m TimeBasedPauseDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeTimeBasedPauseDetails TimeBasedPauseDetails + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeTimeBasedPauseDetails + }{ + "TIME_BASED", + (MarshalTypeTimeBasedPauseDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_details.go new file mode 100644 index 00000000000..34aea3c1f58 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_details.go @@ -0,0 +1,106 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateCompliancePolicyRuleDetails The data to update a CompliancePolicyRule. +type UpdateCompliancePolicyRuleDetails struct { + ProductVersion *ProductVersionDetails `mandatory:"false" json:"productVersion"` + + // PlatformConfiguration OCID for the patch type to which this CompliancePolicyRule applies. + PatchType []string `mandatory:"false" json:"patchType"` + + // Severity to which this CompliancePolicyRule applies. + Severity []ComplianceRuleSeverityEnum `mandatory:"false" json:"severity,omitempty"` + + PatchSelection PatchSelectionDetails `mandatory:"false" json:"patchSelection"` + + // Grace period in days,weeks,months or years the exemption is applicable for the rule. + // This enables a grace period when Fleet Application Management doesn't report the product as noncompliant when patch is not applied. + GracePeriod *string `mandatory:"false" json:"gracePeriod"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateCompliancePolicyRuleDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateCompliancePolicyRuleDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + for _, val := range m.Severity { + if _, ok := GetMappingComplianceRuleSeverityEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", val, strings.Join(GetComplianceRuleSeverityEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdateCompliancePolicyRuleDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + ProductVersion *ProductVersionDetails `json:"productVersion"` + PatchType []string `json:"patchType"` + Severity []ComplianceRuleSeverityEnum `json:"severity"` + PatchSelection patchselectiondetails `json:"patchSelection"` + GracePeriod *string `json:"gracePeriod"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.ProductVersion = model.ProductVersion + + m.PatchType = make([]string, len(model.PatchType)) + copy(m.PatchType, model.PatchType) + m.Severity = make([]ComplianceRuleSeverityEnum, len(model.Severity)) + copy(m.Severity, model.Severity) + nn, e = model.PatchSelection.UnmarshalPolymorphicJSON(model.PatchSelection.JsonData) + if e != nil { + return + } + if nn != nil { + m.PatchSelection = nn.(PatchSelectionDetails) + } else { + m.PatchSelection = nil + } + + m.GracePeriod = model.GracePeriod + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_request_response.go new file mode 100644 index 00000000000..080bc5f7f5e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_compliance_policy_rule_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateCompliancePolicyRuleRequest wrapper for the UpdateCompliancePolicyRule operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateCompliancePolicyRule.go.html to see an example of how to use UpdateCompliancePolicyRuleRequest. +type UpdateCompliancePolicyRuleRequest struct { + + // unique CompliancePolicyRule identifier. + CompliancePolicyRuleId *string `mandatory:"true" contributesTo:"path" name:"compliancePolicyRuleId"` + + // The information to be updated. + UpdateCompliancePolicyRuleDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateCompliancePolicyRuleRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateCompliancePolicyRuleRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateCompliancePolicyRuleRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateCompliancePolicyRuleRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateCompliancePolicyRuleRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateCompliancePolicyRuleResponse wrapper for the UpdateCompliancePolicyRule operation +type UpdateCompliancePolicyRuleResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateCompliancePolicyRuleResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateCompliancePolicyRuleResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_details.go index b8f1466695b..1e210ffaf88 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_request_response.go index 370d5fb8649..2cda0b6e893 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_credential_request_response.go @@ -21,10 +21,10 @@ type UpdateFleetCredentialRequest struct { // unique FleetCredential identifier FleetCredentialId *string `mandatory:"true" contributesTo:"path" name:"fleetCredentialId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` - // The information to be updated. + // The credential information to be updated. UpdateFleetCredentialDetails `contributesTo:"body"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_details.go index 2c009557ecb..634cf33e74a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -32,7 +31,8 @@ type UpdateFleetDetails struct { RuleSelectionCriteria *SelectionCriteria `mandatory:"false" json:"ruleSelectionCriteria"` - // A value which represents if auto confirming of the targets can be enabled + // A value that represents if auto-confirming of the targets can be enabled. + // This will allow targets to be auto-confirmed in the fleet without manual intervention. IsTargetAutoConfirm *bool `mandatory:"false" json:"isTargetAutoConfirm"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_details.go index 325782ef5ee..1366211d08a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// UpdateFleetPropertyDetails The information to be updated. +// UpdateFleetPropertyDetails The information to be updated for the fleet property. type UpdateFleetPropertyDetails struct { - // Value of the Property + // Value of the Property. Value *string `mandatory:"false" json:"value"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_request_response.go index 42b9adf28ad..2935e8112dc 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_property_request_response.go @@ -18,10 +18,10 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleetProperty.go.html to see an example of how to use UpdateFleetPropertyRequest. type UpdateFleetPropertyRequest struct { - // unique FleetProperty identifier + // unique FleetProperty identifier. FleetPropertyId *string `mandatory:"true" contributesTo:"path" name:"fleetPropertyId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The information to be updated. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_request_response.go index 13dbb99ec58..cde8d82eeb1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_request_response.go @@ -18,7 +18,7 @@ import ( // Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateFleet.go.html to see an example of how to use UpdateFleetRequest. type UpdateFleetRequest struct { - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The information to be updated. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_details.go index d2a52216a48..e64b513ee9c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,7 +15,7 @@ import ( "strings" ) -// UpdateFleetResourceDetails The information to be updated. +// UpdateFleetResourceDetails The information to be updated for the resource. type UpdateFleetResourceDetails struct { // OCID of the tenancy to which the resource belongs to. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_request_response.go index 1b4b71687d2..d6be1251dfa 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_fleet_resource_request_response.go @@ -21,7 +21,7 @@ type UpdateFleetResourceRequest struct { // unique FleetResource identifier FleetResourceId *string `mandatory:"true" contributesTo:"path" name:"fleetResourceId"` - // unique Fleet identifier + // Unique Fleet identifier. FleetId *string `mandatory:"true" contributesTo:"path" name:"fleetId"` // The information to be updated. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_details.go index 556fa5016b1..5c3e2cafaef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -32,21 +31,25 @@ type UpdateMaintenanceWindowDetails struct { MaintenanceWindowType MaintenanceWindowTypeEnum `mandatory:"false" json:"maintenanceWindowType,omitempty"` // Does the maintenenace window cause outage? + // An outage indicates whether a maintenance window can consider operations that require downtime. + // It means a period when the application is not accessible. IsOutage *bool `mandatory:"false" json:"isOutage"` - // Start time of schedule + // Specify the date and time of the day that the maintenance window starts. TimeScheduleStart *common.SDKTime `mandatory:"false" json:"timeScheduleStart"` - // Duration if schedule type is Custom + // Duration of the maintenance window. + // Specify how long the maintenance window remains open. Duration *string `mandatory:"false" json:"duration"` - // Is this is a recurring maintenance window + // Is this a recurring maintenance window? IsRecurring *bool `mandatory:"false" json:"isRecurring"` - // Recurrence rule specification if recurring + // Recurrence rule specification if maintenance window recurring. + // Specify the frequency of running the maintenance window. Recurrences *string `mandatory:"false" json:"recurrences"` - // Task initiation cutoff + // Task initiation cutoff time for the maintenance window. TaskInitiationCutoff *int `mandatory:"false" json:"taskInitiationCutoff"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_request_response.go index 520ef684137..07fe72f0b83 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_request_response.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_maintenance_window_request_response.go @@ -21,7 +21,7 @@ type UpdateMaintenanceWindowRequest struct { // unique MaintenanceWindow identifier MaintenanceWindowId *string `mandatory:"true" contributesTo:"path" name:"maintenanceWindowId"` - // The information to be updated. + // The information to be updated for the maintenance window. UpdateMaintenanceWindowDetails `contributesTo:"body"` // For optimistic concurrency control. In the PUT or DELETE call diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_details.go new file mode 100644 index 00000000000..d418da42ecb --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_details.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateOnboardingDetails The information about updating onboarding. +type UpdateOnboardingDetails struct { + + // A value determining Fleet Application Management tag is enabled or not + IsFamsTagEnabled *bool `mandatory:"false" json:"isFamsTagEnabled"` + + // A value determining if cost tracking tag is enabled or not + IsCostTrackingTagEnabled *bool `mandatory:"false" json:"isCostTrackingTagEnabled"` +} + +func (m UpdateOnboardingDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateOnboardingDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_request_response.go new file mode 100644 index 00000000000..6651c32b4ac --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_onboarding_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateOnboardingRequest wrapper for the UpdateOnboarding operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateOnboarding.go.html to see an example of how to use UpdateOnboardingRequest. +type UpdateOnboardingRequest struct { + + // A filter to return resources whose Onboarding identifier matches the given identifier. + OnboardingId *string `mandatory:"true" contributesTo:"path" name:"onboardingId"` + + // The information to be updated. + UpdateOnboardingDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateOnboardingRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateOnboardingRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateOnboardingRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateOnboardingRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateOnboardingRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateOnboardingResponse wrapper for the UpdateOnboarding operation +type UpdateOnboardingResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateOnboardingResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateOnboardingResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_details.go new file mode 100644 index 00000000000..cb0ea0c5d88 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_details.go @@ -0,0 +1,121 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePatchDetails The patch information to be updated. +type UpdatePatchDetails struct { + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + PatchType *PatchType `mandatory:"false" json:"patchType"` + + // Patch Severity. + Severity PatchSeverityEnum `mandatory:"false" json:"severity,omitempty"` + + // Date when the patch was released. + TimeReleased *common.SDKTime `mandatory:"false" json:"timeReleased"` + + ArtifactDetails ArtifactDetails `mandatory:"false" json:"artifactDetails"` + + Product *PatchProduct `mandatory:"false" json:"product"` + + // Dependent Patches. + DependentPatches []DependentPatchDetails `mandatory:"false" json:"dependentPatches"` + + // OCID of the compartment to which the resource belongs to. + CompartmentId *string `mandatory:"false" json:"compartmentId"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdatePatchDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePatchDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingPatchSeverityEnum(string(m.Severity)); !ok && m.Severity != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Severity: %s. Supported values are: %s.", m.Severity, strings.Join(GetPatchSeverityEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdatePatchDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + Description *string `json:"description"` + PatchType *PatchType `json:"patchType"` + Severity PatchSeverityEnum `json:"severity"` + TimeReleased *common.SDKTime `json:"timeReleased"` + ArtifactDetails artifactdetails `json:"artifactDetails"` + Product *PatchProduct `json:"product"` + DependentPatches []DependentPatchDetails `json:"dependentPatches"` + CompartmentId *string `json:"compartmentId"` + FreeformTags map[string]string `json:"freeformTags"` + DefinedTags map[string]map[string]interface{} `json:"definedTags"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.Description = model.Description + + m.PatchType = model.PatchType + + m.Severity = model.Severity + + m.TimeReleased = model.TimeReleased + + nn, e = model.ArtifactDetails.UnmarshalPolymorphicJSON(model.ArtifactDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ArtifactDetails = nn.(ArtifactDetails) + } else { + m.ArtifactDetails = nil + } + + m.Product = model.Product + + m.DependentPatches = make([]DependentPatchDetails, len(model.DependentPatches)) + copy(m.DependentPatches, model.DependentPatches) + m.CompartmentId = model.CompartmentId + + m.FreeformTags = model.FreeformTags + + m.DefinedTags = model.DefinedTags + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_request_response.go new file mode 100644 index 00000000000..94e39242ca0 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_patch_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePatchRequest wrapper for the UpdatePatch operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdatePatch.go.html to see an example of how to use UpdatePatchRequest. +type UpdatePatchRequest struct { + + // unique Patch identifier + PatchId *string `mandatory:"true" contributesTo:"path" name:"patchId"` + + // The information to be updated. + UpdatePatchDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePatchRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePatchRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePatchRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePatchRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePatchRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePatchResponse wrapper for the UpdatePatch operation +type UpdatePatchResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePatchResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePatchResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_details.go new file mode 100644 index 00000000000..671e140b626 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_details.go @@ -0,0 +1,78 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdatePlatformConfigurationDetails The information to be updated. +type UpdatePlatformConfigurationDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + ConfigCategoryDetails ConfigCategoryDetails `mandatory:"false" json:"configCategoryDetails"` +} + +func (m UpdatePlatformConfigurationDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdatePlatformConfigurationDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UnmarshalJSON unmarshals from json +func (m *UpdatePlatformConfigurationDetails) UnmarshalJSON(data []byte) (e error) { + model := struct { + DisplayName *string `json:"displayName"` + Description *string `json:"description"` + ConfigCategoryDetails configcategorydetails `json:"configCategoryDetails"` + }{} + + e = json.Unmarshal(data, &model) + if e != nil { + return + } + var nn interface{} + m.DisplayName = model.DisplayName + + m.Description = model.Description + + nn, e = model.ConfigCategoryDetails.UnmarshalPolymorphicJSON(model.ConfigCategoryDetails.JsonData) + if e != nil { + return + } + if nn != nil { + m.ConfigCategoryDetails = nn.(ConfigCategoryDetails) + } else { + m.ConfigCategoryDetails = nil + } + + return +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_request_response.go new file mode 100644 index 00000000000..c070affe10e --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_platform_configuration_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdatePlatformConfigurationRequest wrapper for the UpdatePlatformConfiguration operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdatePlatformConfiguration.go.html to see an example of how to use UpdatePlatformConfigurationRequest. +type UpdatePlatformConfigurationRequest struct { + + // unique PlatformConfiguration identifier + PlatformConfigurationId *string `mandatory:"true" contributesTo:"path" name:"platformConfigurationId"` + + // The information to be updated. + UpdatePlatformConfigurationDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdatePlatformConfigurationRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdatePlatformConfigurationRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdatePlatformConfigurationRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdatePlatformConfigurationRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdatePlatformConfigurationRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdatePlatformConfigurationResponse wrapper for the UpdatePlatformConfiguration operation +type UpdatePlatformConfigurationResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdatePlatformConfigurationResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdatePlatformConfigurationResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_property_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_property_details.go index 365bd7d74ae..6b4082d76b3 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_property_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_property_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -24,13 +23,13 @@ type UpdatePropertyDetails struct { // Example: `My new resource` DisplayName *string `mandatory:"false" json:"displayName"` - // Text selection of the category + // Text selection of the property. Selection SelectionEnum `mandatory:"false" json:"selection,omitempty"` - // Format of the value + // Format of the value. ValueType ValueTypeEnum `mandatory:"false" json:"valueType,omitempty"` - // Values of the property (must be a single value if selection = 'single choice') + // Values of the property (must be a single value if selection = 'SINGLE_CHOICE'). Values []string `mandatory:"false" json:"values"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_details.go new file mode 100644 index 00000000000..9bf17698449 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_details.go @@ -0,0 +1,79 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateRunbookDetails The information to be updated. +type UpdateRunbookDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + // Type of runbook structure. + RunbookRelevance RunbookRunbookRelevanceEnum `mandatory:"false" json:"runbookRelevance,omitempty"` + + // The lifecycle operation performed by the task. + Operation *string `mandatory:"false" json:"operation"` + + // The OS type for the runbook. + OsType OsTypeEnum `mandatory:"false" json:"osType,omitempty"` + + // The platform of the runbook. + Platform *string `mandatory:"false" json:"platform"` + + // Is the runbook default? + IsDefault *bool `mandatory:"false" json:"isDefault"` + + // Estimated time to successfully complete the runbook execution + EstimatedTime *string `mandatory:"false" json:"estimatedTime"` + + Associations *Associations `mandatory:"false" json:"associations"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateRunbookDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateRunbookDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if _, ok := GetMappingRunbookRunbookRelevanceEnum(string(m.RunbookRelevance)); !ok && m.RunbookRelevance != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for RunbookRelevance: %s. Supported values are: %s.", m.RunbookRelevance, strings.Join(GetRunbookRunbookRelevanceEnumStringValues(), ","))) + } + if _, ok := GetMappingOsTypeEnum(string(m.OsType)); !ok && m.OsType != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for OsType: %s. Supported values are: %s.", m.OsType, strings.Join(GetOsTypeEnumStringValues(), ","))) + } + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_request_response.go new file mode 100644 index 00000000000..e803af7fd50 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_runbook_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateRunbookRequest wrapper for the UpdateRunbook operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateRunbook.go.html to see an example of how to use UpdateRunbookRequest. +type UpdateRunbookRequest struct { + + // Unique Runbook identifier + RunbookId *string `mandatory:"true" contributesTo:"path" name:"runbookId"` + + // The information to be updated. + UpdateRunbookDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateRunbookRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateRunbookRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateRunbookRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateRunbookRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateRunbookRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateRunbookResponse wrapper for the UpdateRunbook operation +type UpdateRunbookResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateRunbookResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateRunbookResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_definition_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_definition_details.go index 3f0235a1bc2..d56e97cd981 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_definition_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_definition_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_job_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_job_details.go index 3749060215e..83e4d20679e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_job_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_scheduler_job_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -16,10 +15,10 @@ import ( "strings" ) -// UpdateSchedulerJobDetails The information to be updated. +// UpdateSchedulerJobDetails The information to be updated for the job. type UpdateSchedulerJobDetails struct { - // Scheduled date for the Job.Provide only the date + // The scheduled date and time for the Job. TimeScheduled *common.SDKTime `mandatory:"false" json:"timeScheduled"` // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_details.go new file mode 100644 index 00000000000..85967cdb51d --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_details.go @@ -0,0 +1,55 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UpdateTaskRecordDetails The information to be updated. +type UpdateTaskRecordDetails struct { + + // A user-friendly name. Does not have to be unique, and it's changeable. + // Avoid entering confidential information. + // Example: `My new resource` + DisplayName *string `mandatory:"false" json:"displayName"` + + // A user-friendly description. To provide some insight about the resource. + // Avoid entering confidential information. + Description *string `mandatory:"false" json:"description"` + + Details *Details `mandatory:"false" json:"details"` + + // Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + // Example: `{"bar-key": "value"}` + FreeformTags map[string]string `mandatory:"false" json:"freeformTags"` + + // Defined tags for this resource. Each key is predefined and scoped to a namespace. + // Example: `{"foo-namespace": {"bar-key": "value"}}` + DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"` +} + +func (m UpdateTaskRecordDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UpdateTaskRecordDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_request_response.go new file mode 100644 index 00000000000..4d9632fb716 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/update_task_record_request_response.go @@ -0,0 +1,100 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// UpdateTaskRecordRequest wrapper for the UpdateTaskRecord operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/fleetappsmanagement/UpdateTaskRecord.go.html to see an example of how to use UpdateTaskRecordRequest. +type UpdateTaskRecordRequest struct { + + // unique TaskDetail identifier + TaskRecordId *string `mandatory:"true" contributesTo:"path" name:"taskRecordId"` + + // The information to be updated. + UpdateTaskRecordDetails `contributesTo:"body"` + + // For optimistic concurrency control. In the PUT or DELETE call + // for a resource, set the `if-match` parameter to the value of the + // etag from a previous GET or POST response for that resource. + // The resource will be updated or deleted only if the etag you + // provide matches the resource's current etag value. + IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` + + // The client request ID for tracing. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request UpdateTaskRecordRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request UpdateTaskRecordRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request UpdateTaskRecordRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request UpdateTaskRecordRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request UpdateTaskRecordRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UpdateTaskRecordResponse wrapper for the UpdateTaskRecord operation +type UpdateTaskRecordResponse struct { + + // The underlying http response + RawResponse *http.Response + + // Unique Oracle-assigned identifier for the asynchronous work. You can use this to query its status. + OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` +} + +func (response UpdateTaskRecordResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response UpdateTaskRecordResponse) HTTPResponse() *http.Response { + return response.RawResponse +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_based_pause_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_based_pause_details.go new file mode 100644 index 00000000000..0460cea7777 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_based_pause_details.go @@ -0,0 +1,51 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UserActionBasedPauseDetails User action-based pause details. +type UserActionBasedPauseDetails struct { +} + +func (m UserActionBasedPauseDetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m UserActionBasedPauseDetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m UserActionBasedPauseDetails) MarshalJSON() (buff []byte, e error) { + type MarshalTypeUserActionBasedPauseDetails UserActionBasedPauseDetails + s := struct { + DiscriminatorParam string `json:"kind"` + MarshalTypeUserActionBasedPauseDetails + }{ + "USER_ACTION", + (MarshalTypeUserActionBasedPauseDetails)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_details.go new file mode 100644 index 00000000000..2cb050e5006 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/user_action_details.go @@ -0,0 +1,179 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// UserActionDetails User action details. +// This can be performed on a failed/paused task or action group. +type UserActionDetails interface { + + // Action to be Performed. + GetAction() UserActionDetailsActionEnum +} + +type useractiondetails struct { + JsonData []byte + Action UserActionDetailsActionEnum `mandatory:"true" json:"action"` + Level string `json:"level"` +} + +// UnmarshalJSON unmarshals json +func (m *useractiondetails) UnmarshalJSON(data []byte) error { + m.JsonData = data + type Unmarshaleruseractiondetails useractiondetails + s := struct { + Model Unmarshaleruseractiondetails + }{} + err := json.Unmarshal(data, &s.Model) + if err != nil { + return err + } + m.Action = s.Model.Action + m.Level = s.Model.Level + + return err +} + +// UnmarshalPolymorphicJSON unmarshals polymorphic json +func (m *useractiondetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { + + if data == nil || string(data) == "null" { + return nil, nil + } + + var err error + switch m.Level { + case "STEP_NAME": + mm := StepBasedUserActionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + case "ACTION_GROUP": + mm := ActionGroupBasedUserActionDetails{} + err = json.Unmarshal(data, &mm) + return mm, err + default: + common.Logf("Recieved unsupported enum value for UserActionDetails: %s.", m.Level) + return *m, nil + } +} + +// GetAction returns Action +func (m useractiondetails) GetAction() UserActionDetailsActionEnum { + return m.Action +} + +func (m useractiondetails) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m useractiondetails) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingUserActionDetailsActionEnum(string(m.Action)); !ok && m.Action != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Action: %s. Supported values are: %s.", m.Action, strings.Join(GetUserActionDetailsActionEnumStringValues(), ","))) + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// UserActionDetailsActionEnum Enum with underlying type: string +type UserActionDetailsActionEnum string + +// Set of constants representing the allowable values for UserActionDetailsActionEnum +const ( + UserActionDetailsActionRetry UserActionDetailsActionEnum = "RETRY" + UserActionDetailsActionResume UserActionDetailsActionEnum = "RESUME" +) + +var mappingUserActionDetailsActionEnum = map[string]UserActionDetailsActionEnum{ + "RETRY": UserActionDetailsActionRetry, + "RESUME": UserActionDetailsActionResume, +} + +var mappingUserActionDetailsActionEnumLowerCase = map[string]UserActionDetailsActionEnum{ + "retry": UserActionDetailsActionRetry, + "resume": UserActionDetailsActionResume, +} + +// GetUserActionDetailsActionEnumValues Enumerates the set of values for UserActionDetailsActionEnum +func GetUserActionDetailsActionEnumValues() []UserActionDetailsActionEnum { + values := make([]UserActionDetailsActionEnum, 0) + for _, v := range mappingUserActionDetailsActionEnum { + values = append(values, v) + } + return values +} + +// GetUserActionDetailsActionEnumStringValues Enumerates the set of values in String for UserActionDetailsActionEnum +func GetUserActionDetailsActionEnumStringValues() []string { + return []string{ + "RETRY", + "RESUME", + } +} + +// GetMappingUserActionDetailsActionEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUserActionDetailsActionEnum(val string) (UserActionDetailsActionEnum, bool) { + enum, ok := mappingUserActionDetailsActionEnumLowerCase[strings.ToLower(val)] + return enum, ok +} + +// UserActionDetailsLevelEnum Enum with underlying type: string +type UserActionDetailsLevelEnum string + +// Set of constants representing the allowable values for UserActionDetailsLevelEnum +const ( + UserActionDetailsLevelActionGroup UserActionDetailsLevelEnum = "ACTION_GROUP" + UserActionDetailsLevelStepName UserActionDetailsLevelEnum = "STEP_NAME" +) + +var mappingUserActionDetailsLevelEnum = map[string]UserActionDetailsLevelEnum{ + "ACTION_GROUP": UserActionDetailsLevelActionGroup, + "STEP_NAME": UserActionDetailsLevelStepName, +} + +var mappingUserActionDetailsLevelEnumLowerCase = map[string]UserActionDetailsLevelEnum{ + "action_group": UserActionDetailsLevelActionGroup, + "step_name": UserActionDetailsLevelStepName, +} + +// GetUserActionDetailsLevelEnumValues Enumerates the set of values for UserActionDetailsLevelEnum +func GetUserActionDetailsLevelEnumValues() []UserActionDetailsLevelEnum { + values := make([]UserActionDetailsLevelEnum, 0) + for _, v := range mappingUserActionDetailsLevelEnum { + values = append(values, v) + } + return values +} + +// GetUserActionDetailsLevelEnumStringValues Enumerates the set of values in String for UserActionDetailsLevelEnum +func GetUserActionDetailsLevelEnumStringValues() []string { + return []string{ + "ACTION_GROUP", + "STEP_NAME", + } +} + +// GetMappingUserActionDetailsLevelEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingUserActionDetailsLevelEnum(val string) (UserActionDetailsLevelEnum, bool) { + enum, ok := mappingUserActionDetailsLevelEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/value_type.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/value_type.go index 65f8b9ffce2..65c03d6cae6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/value_type.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/value_type.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/variable.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/variable.go new file mode 100644 index 00000000000..42a87db374b --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/variable.go @@ -0,0 +1,42 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Fleet Application Management Service API +// +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. +// + +package fleetappsmanagement + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// Variable Credential Variable. +type Variable struct { + + // Name of the variable. + Name *string `mandatory:"false" json:"name"` + + // The value corresponding to the variable name. + Value *string `mandatory:"false" json:"value"` +} + +func (m Variable) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m Variable) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/vault_secret_credential_details.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/vault_secret_credential_details.go index 455c3a316b9..cff11f07840 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/vault_secret_credential_details.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/vault_secret_credential_details.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request.go index 3aeeff83869..50b2f7920b9 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error.go index b6fd7c1105b..c67d13f568b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error_collection.go index 89a65d8cdea..dbe86cc2451 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_error_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry.go index d1de0cb51e6..058aab86e7c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry_collection.go index 05303815820..938dd8d5031 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_log_entry_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource.go index 0ada71ce1c4..6d42c087934 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource_metadata_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource_metadata_key.go index bb539e072d0..2428a3f858b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource_metadata_key.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_resource_metadata_key.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary.go index 9e392e66211..12a169209a4 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary_collection.go index 39eb6d3a430..c53b7d2a3f6 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/work_request_summary_collection.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_component.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_component.go index 0afe403a67a..b588d4a069d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_component.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_component.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group.go index cf3703bee29..e5ab1617c70 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -20,7 +19,7 @@ import ( // WorkflowGroup Workflow Group Layout. type WorkflowGroup struct { - // Provide the name of the group. + // Name of the group. GroupName *string `mandatory:"true" json:"groupName"` // Workflow Group Details. diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group_component.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group_component.go index c4d4aa8d7ae..05a64d2a90d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group_component.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_group_component.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement @@ -20,11 +19,11 @@ import ( // WorkflowGroupComponent Workflow Group Component Details. type WorkflowGroupComponent struct { - // Provide the name of the group. + // Name of the group. GroupName *string `mandatory:"true" json:"groupName"` // Tasks within the Group. - // Provide the stepName for all tasks that are applicable + // Provide the stepName for all applicable tasks. Steps []string `mandatory:"false" json:"steps"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_task_component.go b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_task_component.go index a64aaa38d38..453396a6c7b 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_task_component.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/fleetappsmanagement/workflow_task_component.go @@ -4,8 +4,7 @@ // Fleet Application Management Service API // -// Fleet Application Management Service API. Use this API to for all FAMS related activities. -// To manage fleets,view complaince report for the Fleet,scedule patches and other lifecycle activities +// Fleet Application Management provides a centralized platform to help you automate resource management tasks, validate patch compliance, and enhance operational efficiency across an enterprise. // package fleetappsmanagement diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/auth_token.go b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/auth_token.go index 28e219cf2f5..587ce95e64a 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/auth_token.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/auth_token.go @@ -155,6 +155,17 @@ type AuthToken struct { // - returned: default Description *string `mandatory:"false" json:"description"` + // token + // **Added In:** 2010242156 + // **SCIM++ Properties:** + // - caseExact: true + // - type: string + // - mutability: readOnly + // - required: false + // - returned: default + // - idcsSensitive: hash_sc + Token *string `mandatory:"false" json:"token"` + // The user's credential status. // **Added In:** 2109090424 // **SCIM++ Properties:** diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/customer_secret_key.go b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/customer_secret_key.go index 1638e883fd8..4d7fd6323ed 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/customer_secret_key.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/customer_secret_key.go @@ -198,6 +198,15 @@ type CustomerSecretKey struct { // - returned: default AccessKey *string `mandatory:"false" json:"accessKey"` + // The secret key. + // **SCIM++ Properties:** + // - caseExact: true + // - type: string + // - mutability: readOnly + // - required: false + // - returned: default + SecretKey *string `mandatory:"false" json:"secretKey"` + User *CustomerSecretKeyUser `mandatory:"false" json:"user"` UrnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser *ExtensionSelfChangeUser `mandatory:"false" json:"urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/o_auth2_client_credential.go b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/o_auth2_client_credential.go index 9919f50b168..4143dd958ee 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/o_auth2_client_credential.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/o_auth2_client_credential.go @@ -214,6 +214,17 @@ type OAuth2ClientCredential struct { // - uniqueness: none IsResetSecret *bool `mandatory:"false" json:"isResetSecret"` + // Secret + // **SCIM++ Properties:** + // - caseExact: false + // - type: string + // - mutability: readOnly + // - required: false + // - returned: default + // - idcsScimCompliant: false + // - idcsSensitive: hash_sc + Secret *string `mandatory:"false" json:"secret"` + User *OAuth2ClientCredentialUser `mandatory:"false" json:"user"` UrnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser *ExtensionSelfChangeUser `mandatory:"false" json:"urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/smtp_credential.go b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/smtp_credential.go index e37defc4c6f..d30b98924a1 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/smtp_credential.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/identitydomains/smtp_credential.go @@ -189,6 +189,16 @@ type SmtpCredential struct { // - uniqueness: none ExpiresOn *string `mandatory:"false" json:"expiresOn"` + // Password + // **SCIM++ Properties:** + // - caseExact: true + // - type: string + // - mutability: readOnly + // - required: false + // - returned: default + // - idcsSensitive: hash_sc + Password *string `mandatory:"false" json:"password"` + User *SmtpCredentialUser `mandatory:"false" json:"user"` UrnIetfParamsScimSchemasOracleIdcsExtensionSelfChangeUser *ExtensionSelfChangeUser `mandatory:"false" json:"urn:ietf:params:scim:schemas:oracle:idcs:extension:selfChange:User"` diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_configuration_metric_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_configuration_metric_group.go index a5ac2f047f1..f5e4835bb51 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_configuration_metric_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_configuration_metric_group.go @@ -70,6 +70,10 @@ func (m *hostconfigurationmetricgroup) UnmarshalPolymorphicJSON(data []byte) (in mm := HostFilesystemConfiguration{} err = json.Unmarshal(data, &mm) return mm, err + case "HOST_CONTAINERS": + mm := HostContainers{} + err = json.Unmarshal(data, &mm) + return mm, err case "HOST_NETWORK_CONFIGURATION": mm := HostNetworkConfiguration{} err = json.Unmarshal(data, &mm) @@ -135,6 +139,7 @@ const ( HostConfigurationMetricGroupMetricNameEntites HostConfigurationMetricGroupMetricNameEnum = "HOST_ENTITES" HostConfigurationMetricGroupMetricNameFilesystemConfiguration HostConfigurationMetricGroupMetricNameEnum = "HOST_FILESYSTEM_CONFIGURATION" HostConfigurationMetricGroupMetricNameGpuConfiguration HostConfigurationMetricGroupMetricNameEnum = "HOST_GPU_CONFIGURATION" + HostConfigurationMetricGroupMetricNameContainers HostConfigurationMetricGroupMetricNameEnum = "HOST_CONTAINERS" ) var mappingHostConfigurationMetricGroupMetricNameEnum = map[string]HostConfigurationMetricGroupMetricNameEnum{ @@ -147,6 +152,7 @@ var mappingHostConfigurationMetricGroupMetricNameEnum = map[string]HostConfigura "HOST_ENTITES": HostConfigurationMetricGroupMetricNameEntites, "HOST_FILESYSTEM_CONFIGURATION": HostConfigurationMetricGroupMetricNameFilesystemConfiguration, "HOST_GPU_CONFIGURATION": HostConfigurationMetricGroupMetricNameGpuConfiguration, + "HOST_CONTAINERS": HostConfigurationMetricGroupMetricNameContainers, } var mappingHostConfigurationMetricGroupMetricNameEnumLowerCase = map[string]HostConfigurationMetricGroupMetricNameEnum{ @@ -159,6 +165,7 @@ var mappingHostConfigurationMetricGroupMetricNameEnumLowerCase = map[string]Host "host_entites": HostConfigurationMetricGroupMetricNameEntites, "host_filesystem_configuration": HostConfigurationMetricGroupMetricNameFilesystemConfiguration, "host_gpu_configuration": HostConfigurationMetricGroupMetricNameGpuConfiguration, + "host_containers": HostConfigurationMetricGroupMetricNameContainers, } // GetHostConfigurationMetricGroupMetricNameEnumValues Enumerates the set of values for HostConfigurationMetricGroupMetricNameEnum @@ -182,6 +189,7 @@ func GetHostConfigurationMetricGroupMetricNameEnumStringValues() []string { "HOST_ENTITES", "HOST_FILESYSTEM_CONFIGURATION", "HOST_GPU_CONFIGURATION", + "HOST_CONTAINERS", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_containers.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_containers.go index a7c11d528f7..7004897bf50 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_containers.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_containers.go @@ -34,6 +34,12 @@ type HostContainers struct { // Container Image ContainerImage *string `mandatory:"false" json:"containerImage"` + // Container Image Tag (version) + ContainerImageTag *string `mandatory:"false" json:"containerImageTag"` + + // Container Image Digest + ContainerImageDigest *string `mandatory:"false" json:"containerImageDigest"` + // Container open ports ContainerPorts *string `mandatory:"false" json:"containerPorts"` } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_io_statistics.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_io_statistics.go new file mode 100644 index 00000000000..a3b4c7a158c --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_io_statistics.go @@ -0,0 +1,91 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "encoding/json" + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// HostIoStatistics Contains io statistics. +type HostIoStatistics struct { + + // Total amount used of the resource metric type (CPU, STORAGE). + Usage *float64 `mandatory:"true" json:"usage"` + + // The maximum allocated amount of the resource metric type (CPU, STORAGE) for a set of databases. + Capacity *float64 `mandatory:"true" json:"capacity"` + + // Resource utilization in percentage. + UtilizationPercent *float64 `mandatory:"true" json:"utilizationPercent"` + + // Change in resource utilization in percentage + UsageChangePercent *float64 `mandatory:"true" json:"usageChangePercent"` + + DiskReadInMBs *float64 `mandatory:"false" json:"diskReadInMBs"` + + DiskWriteInMBs *float64 `mandatory:"false" json:"diskWriteInMBs"` + + DiskIops *float64 `mandatory:"false" json:"diskIops"` +} + +// GetUsage returns Usage +func (m HostIoStatistics) GetUsage() *float64 { + return m.Usage +} + +// GetCapacity returns Capacity +func (m HostIoStatistics) GetCapacity() *float64 { + return m.Capacity +} + +// GetUtilizationPercent returns UtilizationPercent +func (m HostIoStatistics) GetUtilizationPercent() *float64 { + return m.UtilizationPercent +} + +// GetUsageChangePercent returns UsageChangePercent +func (m HostIoStatistics) GetUsageChangePercent() *float64 { + return m.UsageChangePercent +} + +func (m HostIoStatistics) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m HostIoStatistics) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// MarshalJSON marshals to json representation +func (m HostIoStatistics) MarshalJSON() (buff []byte, e error) { + type MarshalTypeHostIoStatistics HostIoStatistics + s := struct { + DiscriminatorParam string `json:"resourceName"` + MarshalTypeHostIoStatistics + }{ + "HOST_IO_STATISTICS", + (MarshalTypeHostIoStatistics)(m), + } + + return json.Marshal(&s) +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go index f5c40596ced..a1da12f0a62 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_performance_metric_group.go @@ -70,10 +70,6 @@ func (m *hostperformancemetricgroup) UnmarshalPolymorphicJSON(data []byte) (inte mm := HostCpuUsage{} err = json.Unmarshal(data, &mm) return mm, err - case "HOST_CONTAINERS": - mm := HostContainers{} - err = json.Unmarshal(data, &mm) - return mm, err case "HOST_GPU_USAGE": mm := HostGpuUsage{} err = json.Unmarshal(data, &mm) @@ -134,7 +130,6 @@ const ( HostPerformanceMetricGroupMetricNameGpuUsage HostPerformanceMetricGroupMetricNameEnum = "HOST_GPU_USAGE" HostPerformanceMetricGroupMetricNameGpuProcesses HostPerformanceMetricGroupMetricNameEnum = "HOST_GPU_PROCESSES" HostPerformanceMetricGroupMetricNameIoUsage HostPerformanceMetricGroupMetricNameEnum = "HOST_IO_USAGE" - HostPerformanceMetricGroupMetricNameContainers HostPerformanceMetricGroupMetricNameEnum = "HOST_CONTAINERS" ) var mappingHostPerformanceMetricGroupMetricNameEnum = map[string]HostPerformanceMetricGroupMetricNameEnum{ @@ -146,7 +141,6 @@ var mappingHostPerformanceMetricGroupMetricNameEnum = map[string]HostPerformance "HOST_GPU_USAGE": HostPerformanceMetricGroupMetricNameGpuUsage, "HOST_GPU_PROCESSES": HostPerformanceMetricGroupMetricNameGpuProcesses, "HOST_IO_USAGE": HostPerformanceMetricGroupMetricNameIoUsage, - "HOST_CONTAINERS": HostPerformanceMetricGroupMetricNameContainers, } var mappingHostPerformanceMetricGroupMetricNameEnumLowerCase = map[string]HostPerformanceMetricGroupMetricNameEnum{ @@ -158,7 +152,6 @@ var mappingHostPerformanceMetricGroupMetricNameEnumLowerCase = map[string]HostPe "host_gpu_usage": HostPerformanceMetricGroupMetricNameGpuUsage, "host_gpu_processes": HostPerformanceMetricGroupMetricNameGpuProcesses, "host_io_usage": HostPerformanceMetricGroupMetricNameIoUsage, - "host_containers": HostPerformanceMetricGroupMetricNameContainers, } // GetHostPerformanceMetricGroupMetricNameEnumValues Enumerates the set of values for HostPerformanceMetricGroupMetricNameEnum @@ -181,7 +174,6 @@ func GetHostPerformanceMetricGroupMetricNameEnumStringValues() []string { "HOST_GPU_USAGE", "HOST_GPU_PROCESSES", "HOST_IO_USAGE", - "HOST_CONTAINERS", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_resource_statistics.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_resource_statistics.go index 012651263ae..cb8fe76be8c 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_resource_statistics.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/host_resource_statistics.go @@ -84,6 +84,10 @@ func (m *hostresourcestatistics) UnmarshalPolymorphicJSON(data []byte) (interfac mm := HostMemoryStatistics{} err = json.Unmarshal(data, &mm) return mm, err + case "HOST_IO_STATISTICS": + mm := HostIoStatistics{} + err = json.Unmarshal(data, &mm) + return mm, err case "HOST_CPU_STATISTICS": mm := HostCpuStatistics{} err = json.Unmarshal(data, &mm) @@ -139,6 +143,7 @@ const ( HostResourceStatisticsResourceNameMemoryStatistics HostResourceStatisticsResourceNameEnum = "HOST_MEMORY_STATISTICS" HostResourceStatisticsResourceNameStorageStatistics HostResourceStatisticsResourceNameEnum = "HOST_STORAGE_STATISTICS" HostResourceStatisticsResourceNameNetworkStatistics HostResourceStatisticsResourceNameEnum = "HOST_NETWORK_STATISTICS" + HostResourceStatisticsResourceNameIoStatistics HostResourceStatisticsResourceNameEnum = "HOST_IO_STATISTICS" ) var mappingHostResourceStatisticsResourceNameEnum = map[string]HostResourceStatisticsResourceNameEnum{ @@ -146,6 +151,7 @@ var mappingHostResourceStatisticsResourceNameEnum = map[string]HostResourceStati "HOST_MEMORY_STATISTICS": HostResourceStatisticsResourceNameMemoryStatistics, "HOST_STORAGE_STATISTICS": HostResourceStatisticsResourceNameStorageStatistics, "HOST_NETWORK_STATISTICS": HostResourceStatisticsResourceNameNetworkStatistics, + "HOST_IO_STATISTICS": HostResourceStatisticsResourceNameIoStatistics, } var mappingHostResourceStatisticsResourceNameEnumLowerCase = map[string]HostResourceStatisticsResourceNameEnum{ @@ -153,6 +159,7 @@ var mappingHostResourceStatisticsResourceNameEnumLowerCase = map[string]HostReso "host_memory_statistics": HostResourceStatisticsResourceNameMemoryStatistics, "host_storage_statistics": HostResourceStatisticsResourceNameStorageStatistics, "host_network_statistics": HostResourceStatisticsResourceNameNetworkStatistics, + "host_io_statistics": HostResourceStatisticsResourceNameIoStatistics, } // GetHostResourceStatisticsResourceNameEnumValues Enumerates the set of values for HostResourceStatisticsResourceNameEnum @@ -171,6 +178,7 @@ func GetHostResourceStatisticsResourceNameEnumStringValues() []string { "HOST_MEMORY_STATISTICS", "HOST_STORAGE_STATISTICS", "HOST_NETWORK_STATISTICS", + "HOST_IO_STATISTICS", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend.go new file mode 100644 index 00000000000..06c420118a1 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend.go @@ -0,0 +1,56 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IoUsageTrend Usage data for IO interface per usage unit. +type IoUsageTrend struct { + + // The timestamp in which the current sampling period ends in RFC 3339 format. + EndTimestamp *common.SDKTime `mandatory:"true" json:"endTimestamp"` + + // MBs Read. + DiskBytesReadInMBs *float64 `mandatory:"true" json:"diskBytesReadInMBs"` + + // MBs Written. + DiskBytesWrittenInMBs *float64 `mandatory:"true" json:"diskBytesWrittenInMBs"` + + // Read IO operations per second. + DiskIopsRead *float64 `mandatory:"true" json:"diskIopsRead"` + + // Write IO operations per second. + DiskIopsWritten *float64 `mandatory:"true" json:"diskIopsWritten"` + + // IO operations per second. + DiskIops *float64 `mandatory:"true" json:"diskIops"` +} + +func (m IoUsageTrend) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IoUsageTrend) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend_aggregation.go new file mode 100644 index 00000000000..70904a17c3f --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/io_usage_trend_aggregation.go @@ -0,0 +1,44 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// IoUsageTrendAggregation Usage data per io interface. +type IoUsageTrendAggregation struct { + + // Mount point is specialized NTFS filesystem object. + MountPoint *string `mandatory:"true" json:"mountPoint"` + + // List of usage data samples for a IO interface. + UsageData []IoUsageTrend `mandatory:"true" json:"usageData"` +} + +func (m IoUsageTrendAggregation) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m IoUsageTrendAggregation) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go index 309d4b081f5..3a968d2ede8 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/opsi_operationsinsights_client.go @@ -9133,6 +9133,64 @@ func (client OperationsInsightsClient) summarizeHostInsightHostRecommendation(ct return response, err } +// SummarizeHostInsightIoUsageTrend Returns response with usage time series data with breakdown by IO interface for the time period specified. +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeHostInsightIoUsageTrend.go.html to see an example of how to use SummarizeHostInsightIoUsageTrend API. +// A default retry strategy applies to this operation SummarizeHostInsightIoUsageTrend() +func (client OperationsInsightsClient) SummarizeHostInsightIoUsageTrend(ctx context.Context, request SummarizeHostInsightIoUsageTrendRequest) (response SummarizeHostInsightIoUsageTrendResponse, err error) { + var ociResponse common.OCIResponse + policy := common.DefaultRetryPolicy() + if client.RetryPolicy() != nil { + policy = *client.RetryPolicy() + } + if request.RetryPolicy() != nil { + policy = *request.RetryPolicy() + } + ociResponse, err = common.Retry(ctx, request, client.summarizeHostInsightIoUsageTrend, policy) + if err != nil { + if ociResponse != nil { + if httpResponse := ociResponse.HTTPResponse(); httpResponse != nil { + opcRequestId := httpResponse.Header.Get("opc-request-id") + response = SummarizeHostInsightIoUsageTrendResponse{RawResponse: httpResponse, OpcRequestId: &opcRequestId} + } else { + response = SummarizeHostInsightIoUsageTrendResponse{} + } + } + return + } + if convertedResponse, ok := ociResponse.(SummarizeHostInsightIoUsageTrendResponse); ok { + response = convertedResponse + } else { + err = fmt.Errorf("failed to convert OCIResponse into SummarizeHostInsightIoUsageTrendResponse") + } + return +} + +// summarizeHostInsightIoUsageTrend implements the OCIOperation interface (enables retrying operations) +func (client OperationsInsightsClient) summarizeHostInsightIoUsageTrend(ctx context.Context, request common.OCIRequest, binaryReqBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (common.OCIResponse, error) { + + httpRequest, err := request.HTTPRequest(http.MethodGet, "/hostInsights/ioUsageTrend", binaryReqBody, extraHeaders) + if err != nil { + return nil, err + } + + var response SummarizeHostInsightIoUsageTrendResponse + var httpResponse *http.Response + httpResponse, err = client.Call(ctx, &httpRequest) + defer common.CloseBodyIfValid(httpResponse) + response.RawResponse = httpResponse + if err != nil { + apiReferenceLink := "https://docs.oracle.com/iaas/api/#/en/operations-insights/20200630/HostInsights/SummarizeHostInsightIoUsageTrend" + err = common.PostProcessServiceError(err, "OperationsInsights", "SummarizeHostInsightIoUsageTrend", apiReferenceLink) + return response, err + } + + err = common.UnmarshalResponse(httpResponse, &response) + return response, err +} + // SummarizeHostInsightNetworkUsageTrend Returns response with usage time series data with breakdown by network interface for the time period specified. // // # See also diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go index f0595338b8c..ddb3eec95a0 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_host_recommendation_aggregation.go @@ -112,6 +112,7 @@ const ( SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "NETWORK" SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuUtilization SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "GPU_UTILIZATION" SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" + SummarizeHostInsightHostRecommendationAggregationResourceMetricIo SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "IO" ) var mappingSummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = map[string]SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum{ @@ -122,6 +123,7 @@ var mappingSummarizeHostInsightHostRecommendationAggregationResourceMetricEnum = "NETWORK": SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork, "GPU_UTILIZATION": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuUtilization, "GPU_MEMORY_USAGE": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuMemoryUsage, + "IO": SummarizeHostInsightHostRecommendationAggregationResourceMetricIo, } var mappingSummarizeHostInsightHostRecommendationAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum{ @@ -132,6 +134,7 @@ var mappingSummarizeHostInsightHostRecommendationAggregationResourceMetricEnumLo "network": SummarizeHostInsightHostRecommendationAggregationResourceMetricNetwork, "gpu_utilization": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuUtilization, "gpu_memory_usage": SummarizeHostInsightHostRecommendationAggregationResourceMetricGpuMemoryUsage, + "io": SummarizeHostInsightHostRecommendationAggregationResourceMetricIo, } // GetSummarizeHostInsightHostRecommendationAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightHostRecommendationAggregationResourceMetricEnum @@ -153,6 +156,7 @@ func GetSummarizeHostInsightHostRecommendationAggregationResourceMetricEnumStrin "NETWORK", "GPU_UTILIZATION", "GPU_MEMORY_USAGE", + "IO", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_aggregation_collection.go new file mode 100644 index 00000000000..7b3204a8bae --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_aggregation_collection.go @@ -0,0 +1,50 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +// Ops Insights API +// +// Use the Ops Insights API to perform data extraction operations to obtain database +// resource utilization, performance statistics, and reference information. For more information, +// see About Oracle Cloud Infrastructure Ops Insights (https://docs.cloud.oracle.com/en-us/iaas/operations-insights/doc/operations-insights.html). +// + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "strings" +) + +// SummarizeHostInsightIoUsageTrendAggregationCollection Top level response object. +type SummarizeHostInsightIoUsageTrendAggregationCollection struct { + + // The start timestamp that was passed into the request. + TimeIntervalStart *common.SDKTime `mandatory:"true" json:"timeIntervalStart"` + + // The end timestamp that was passed into the request. + TimeIntervalEnd *common.SDKTime `mandatory:"true" json:"timeIntervalEnd"` + + // Time duration in milliseconds between data points (one hour or one day). + ItemDurationInMs *int64 `mandatory:"true" json:"itemDurationInMs"` + + // Collection of Usage Data with time stamps for all IO interfaces. + Items []IoUsageTrendAggregation `mandatory:"true" json:"items"` +} + +func (m SummarizeHostInsightIoUsageTrendAggregationCollection) String() string { + return common.PointerString(m) +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (m SummarizeHostInsightIoUsageTrendAggregationCollection) ValidateEnumValue() (bool, error) { + errMessage := []string{} + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_request_response.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_request_response.go new file mode 100644 index 00000000000..8413b1f9610 --- /dev/null +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_io_usage_trend_request_response.go @@ -0,0 +1,190 @@ +// Copyright (c) 2016, 2018, 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. +// Code generated. DO NOT EDIT. + +package opsi + +import ( + "fmt" + "github.com/oracle/oci-go-sdk/v65/common" + "net/http" + "strings" +) + +// SummarizeHostInsightIoUsageTrendRequest wrapper for the SummarizeHostInsightIoUsageTrend operation +// +// # See also +// +// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/opsi/SummarizeHostInsightIoUsageTrend.go.html to see an example of how to use SummarizeHostInsightIoUsageTrendRequest. +type SummarizeHostInsightIoUsageTrendRequest struct { + + // The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. + CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` + + // Required OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host insight resource. + Id *string `mandatory:"true" contributesTo:"query" name:"id"` + + // Specify time period in ISO 8601 format with respect to current time. + // Default is last 30 days represented by P30D. + // If timeInterval is specified, then timeIntervalStart and timeIntervalEnd will be ignored. + // Examples P90D (last 90 days), P4W (last 4 weeks), P2M (last 2 months), P1Y (last 12 months), . Maximum value allowed is 25 months prior to current time (P25M). + AnalysisTimeInterval *string `mandatory:"false" contributesTo:"query" name:"analysisTimeInterval"` + + // Analysis start time in UTC in ISO 8601 format(inclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // The minimum allowed value is 2 years prior to the current day. + // timeIntervalStart and timeIntervalEnd parameters are used together. + // If analysisTimeInterval is specified, this parameter is ignored. + TimeIntervalStart *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalStart"` + + // Analysis end time in UTC in ISO 8601 format(exclusive). + // Example 2019-10-30T00:00:00Z (yyyy-MM-ddThh:mm:ssZ). + // timeIntervalStart and timeIntervalEnd are used together. + // If timeIntervalEnd is not specified, current time is used as timeIntervalEnd. + TimeIntervalEnd *common.SDKTime `mandatory:"false" contributesTo:"query" name:"timeIntervalEnd"` + + // Optional OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the host (Compute Id) + HostId *string `mandatory:"false" contributesTo:"query" name:"hostId"` + + // For list pagination. The value of the `opc-next-page` response header from + // the previous "List" call. For important details about how pagination works, + // see List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + Page *string `mandatory:"false" contributesTo:"query" name:"page"` + + // For list pagination. The maximum number of results per page, or items to + // return in a paginated "List" call. + // For important details about how pagination works, see + // List Pagination (https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine). + // Example: `50` + Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` + + // Choose the type of statistic metric data to be used for forecasting. + Statistic SummarizeHostInsightIoUsageTrendStatisticEnum `mandatory:"false" contributesTo:"query" name:"statistic" omitEmpty:"true"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` + + // Resource Status + Status []ResourceStatusEnum `contributesTo:"query" name:"status" omitEmpty:"true" collectionFormat:"multi"` + + // Metadata about the request. This information will not be transmitted to the service, but + // represents information that the SDK will consume to drive retry behavior. + RequestMetadata common.RequestMetadata +} + +func (request SummarizeHostInsightIoUsageTrendRequest) String() string { + return common.PointerString(request) +} + +// HTTPRequest implements the OCIRequest interface +func (request SummarizeHostInsightIoUsageTrendRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { + + _, err := request.ValidateEnumValue() + if err != nil { + return http.Request{}, err + } + return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) +} + +// BinaryRequestBody implements the OCIRequest interface +func (request SummarizeHostInsightIoUsageTrendRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { + + return nil, false + +} + +// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. +func (request SummarizeHostInsightIoUsageTrendRequest) RetryPolicy() *common.RetryPolicy { + return request.RequestMetadata.RetryPolicy +} + +// ValidateEnumValue returns an error when providing an unsupported enum value +// This function is being called during constructing API request process +// Not recommended for calling this function directly +func (request SummarizeHostInsightIoUsageTrendRequest) ValidateEnumValue() (bool, error) { + errMessage := []string{} + if _, ok := GetMappingSummarizeHostInsightIoUsageTrendStatisticEnum(string(request.Statistic)); !ok && request.Statistic != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Statistic: %s. Supported values are: %s.", request.Statistic, strings.Join(GetSummarizeHostInsightIoUsageTrendStatisticEnumStringValues(), ","))) + } + for _, val := range request.Status { + if _, ok := GetMappingResourceStatusEnum(string(val)); !ok && val != "" { + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Status: %s. Supported values are: %s.", val, strings.Join(GetResourceStatusEnumStringValues(), ","))) + } + } + + if len(errMessage) > 0 { + return true, fmt.Errorf(strings.Join(errMessage, "\n")) + } + return false, nil +} + +// SummarizeHostInsightIoUsageTrendResponse wrapper for the SummarizeHostInsightIoUsageTrend operation +type SummarizeHostInsightIoUsageTrendResponse struct { + + // The underlying http response + RawResponse *http.Response + + // A list of SummarizeHostInsightIoUsageTrendAggregationCollection instances + SummarizeHostInsightIoUsageTrendAggregationCollection `presentIn:"body"` + + // Unique Oracle-assigned identifier for the request. If you need to contact + // Oracle about a particular request, please provide the request ID. + OpcRequestId *string `presentIn:"header" name:"opc-request-id"` + + // For pagination of a list of items. When paging through a list, if this header appears in the response, + // then a partial list might have been returned. Include this value as the `page` parameter for the + // subsequent GET request to get the next batch of items. + OpcNextPage *string `presentIn:"header" name:"opc-next-page"` +} + +func (response SummarizeHostInsightIoUsageTrendResponse) String() string { + return common.PointerString(response) +} + +// HTTPResponse implements the OCIResponse interface +func (response SummarizeHostInsightIoUsageTrendResponse) HTTPResponse() *http.Response { + return response.RawResponse +} + +// SummarizeHostInsightIoUsageTrendStatisticEnum Enum with underlying type: string +type SummarizeHostInsightIoUsageTrendStatisticEnum string + +// Set of constants representing the allowable values for SummarizeHostInsightIoUsageTrendStatisticEnum +const ( + SummarizeHostInsightIoUsageTrendStatisticAvg SummarizeHostInsightIoUsageTrendStatisticEnum = "AVG" + SummarizeHostInsightIoUsageTrendStatisticMax SummarizeHostInsightIoUsageTrendStatisticEnum = "MAX" +) + +var mappingSummarizeHostInsightIoUsageTrendStatisticEnum = map[string]SummarizeHostInsightIoUsageTrendStatisticEnum{ + "AVG": SummarizeHostInsightIoUsageTrendStatisticAvg, + "MAX": SummarizeHostInsightIoUsageTrendStatisticMax, +} + +var mappingSummarizeHostInsightIoUsageTrendStatisticEnumLowerCase = map[string]SummarizeHostInsightIoUsageTrendStatisticEnum{ + "avg": SummarizeHostInsightIoUsageTrendStatisticAvg, + "max": SummarizeHostInsightIoUsageTrendStatisticMax, +} + +// GetSummarizeHostInsightIoUsageTrendStatisticEnumValues Enumerates the set of values for SummarizeHostInsightIoUsageTrendStatisticEnum +func GetSummarizeHostInsightIoUsageTrendStatisticEnumValues() []SummarizeHostInsightIoUsageTrendStatisticEnum { + values := make([]SummarizeHostInsightIoUsageTrendStatisticEnum, 0) + for _, v := range mappingSummarizeHostInsightIoUsageTrendStatisticEnum { + values = append(values, v) + } + return values +} + +// GetSummarizeHostInsightIoUsageTrendStatisticEnumStringValues Enumerates the set of values in String for SummarizeHostInsightIoUsageTrendStatisticEnum +func GetSummarizeHostInsightIoUsageTrendStatisticEnumStringValues() []string { + return []string{ + "AVG", + "MAX", + } +} + +// GetMappingSummarizeHostInsightIoUsageTrendStatisticEnum performs case Insensitive comparison on enum value and return the desired enum +func GetMappingSummarizeHostInsightIoUsageTrendStatisticEnum(val string) (SummarizeHostInsightIoUsageTrendStatisticEnum, bool) { + enum, ok := mappingSummarizeHostInsightIoUsageTrendStatisticEnumLowerCase[strings.ToLower(val)] + return enum, ok +} diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go index dc65e64c31c..b3a7564026e 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_capacity_trend_aggregation_collection.go @@ -79,6 +79,7 @@ const ( SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "NETWORK" SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuUtilization SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "GPU_UTILIZATION" SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuMemoryUsage SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "GPU_MEMORY_USAGE" + SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricIo SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = "IO" ) var mappingSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum = map[string]SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum{ @@ -89,6 +90,7 @@ var mappingSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourc "NETWORK": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork, "GPU_UTILIZATION": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuUtilization, "GPU_MEMORY_USAGE": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuMemoryUsage, + "IO": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricIo, } var mappingSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum{ @@ -99,6 +101,7 @@ var mappingSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourc "network": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricNetwork, "gpu_utilization": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuUtilization, "gpu_memory_usage": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricGpuMemoryUsage, + "io": SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricIo, } // GetSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMetricEnum @@ -120,6 +123,7 @@ func GetSummarizeHostInsightResourceCapacityTrendAggregationCollectionResourceMe "NETWORK", "GPU_UTILIZATION", "GPU_MEMORY_USAGE", + "IO", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go index ed660a5438c..f75c7b9dd30 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_forecast_trend_aggregation.go @@ -88,6 +88,7 @@ const ( SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "NETWORK" SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuUtilization SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "GPU_UTILIZATION" SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" + SummarizeHostInsightResourceForecastTrendAggregationResourceMetricIo SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = "IO" ) var mappingSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum = map[string]SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum{ @@ -98,6 +99,7 @@ var mappingSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnu "NETWORK": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork, "GPU_UTILIZATION": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuUtilization, "GPU_MEMORY_USAGE": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuMemoryUsage, + "IO": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricIo, } var mappingSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum{ @@ -108,6 +110,7 @@ var mappingSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnu "network": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricNetwork, "gpu_utilization": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuUtilization, "gpu_memory_usage": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricGpuMemoryUsage, + "io": SummarizeHostInsightResourceForecastTrendAggregationResourceMetricIo, } // GetSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnum @@ -129,6 +132,7 @@ func GetSummarizeHostInsightResourceForecastTrendAggregationResourceMetricEnumSt "NETWORK", "GPU_UTILIZATION", "GPU_MEMORY_USAGE", + "IO", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go index 87bb0bbfc13..88787928f38 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_statistics_aggregation_collection.go @@ -76,6 +76,7 @@ const ( SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "NETWORK" SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuUtilization SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "GPU_UTILIZATION" SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuMemoryUsage SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "GPU_MEMORY_USAGE" + SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricIo SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = "IO" ) var mappingSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum = map[string]SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum{ @@ -86,6 +87,7 @@ var mappingSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMe "NETWORK": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork, "GPU_UTILIZATION": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuUtilization, "GPU_MEMORY_USAGE": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuMemoryUsage, + "IO": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricIo, } var mappingSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum{ @@ -96,6 +98,7 @@ var mappingSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMe "network": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricNetwork, "gpu_utilization": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuUtilization, "gpu_memory_usage": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricGpuMemoryUsage, + "io": SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricIo, } // GetSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetricEnum @@ -117,6 +120,7 @@ func GetSummarizeHostInsightResourceStatisticsAggregationCollectionResourceMetri "NETWORK", "GPU_UTILIZATION", "GPU_MEMORY_USAGE", + "IO", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go index 64bcd6d0f22..2c6ffe90534 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_aggregation.go @@ -76,6 +76,7 @@ const ( SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "NETWORK" SummarizeHostInsightResourceUsageAggregationResourceMetricGpuUtilization SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "GPU_UTILIZATION" SummarizeHostInsightResourceUsageAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" + SummarizeHostInsightResourceUsageAggregationResourceMetricIo SummarizeHostInsightResourceUsageAggregationResourceMetricEnum = "IO" ) var mappingSummarizeHostInsightResourceUsageAggregationResourceMetricEnum = map[string]SummarizeHostInsightResourceUsageAggregationResourceMetricEnum{ @@ -86,6 +87,7 @@ var mappingSummarizeHostInsightResourceUsageAggregationResourceMetricEnum = map[ "NETWORK": SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork, "GPU_UTILIZATION": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuUtilization, "GPU_MEMORY_USAGE": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuMemoryUsage, + "IO": SummarizeHostInsightResourceUsageAggregationResourceMetricIo, } var mappingSummarizeHostInsightResourceUsageAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceUsageAggregationResourceMetricEnum{ @@ -96,6 +98,7 @@ var mappingSummarizeHostInsightResourceUsageAggregationResourceMetricEnumLowerCa "network": SummarizeHostInsightResourceUsageAggregationResourceMetricNetwork, "gpu_utilization": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuUtilization, "gpu_memory_usage": SummarizeHostInsightResourceUsageAggregationResourceMetricGpuMemoryUsage, + "io": SummarizeHostInsightResourceUsageAggregationResourceMetricIo, } // GetSummarizeHostInsightResourceUsageAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceUsageAggregationResourceMetricEnum @@ -117,6 +120,7 @@ func GetSummarizeHostInsightResourceUsageAggregationResourceMetricEnumStringValu "NETWORK", "GPU_UTILIZATION", "GPU_MEMORY_USAGE", + "IO", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go index e79bd13d3f4..750806cc5ef 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_usage_trend_aggregation_collection.go @@ -73,6 +73,7 @@ const ( SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "NETWORK" SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuUtilization SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "GPU_UTILIZATION" SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuMemoryUsage SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "GPU_MEMORY_USAGE" + SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricIo SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = "IO" ) var mappingSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum = map[string]SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum{ @@ -83,6 +84,7 @@ var mappingSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMe "NETWORK": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork, "GPU_UTILIZATION": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuUtilization, "GPU_MEMORY_USAGE": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuMemoryUsage, + "IO": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricIo, } var mappingSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum{ @@ -93,6 +95,7 @@ var mappingSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMe "network": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricNetwork, "gpu_utilization": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuUtilization, "gpu_memory_usage": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricGpuMemoryUsage, + "io": SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricIo, } // GetSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetricEnum @@ -114,6 +117,7 @@ func GetSummarizeHostInsightResourceUsageTrendAggregationCollectionResourceMetri "NETWORK", "GPU_UTILIZATION", "GPU_MEMORY_USAGE", + "IO", } } diff --git a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go index 0097a6b5108..2bafda78f9d 100644 --- a/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go +++ b/vendor/github.com/oracle/oci-go-sdk/v65/opsi/summarize_host_insight_resource_utilization_insight_aggregation.go @@ -71,6 +71,7 @@ const ( SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "NETWORK" SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuUtilization SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "GPU_UTILIZATION" SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuMemoryUsage SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "GPU_MEMORY_USAGE" + SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricIo SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = "IO" ) var mappingSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum = map[string]SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum{ @@ -81,6 +82,7 @@ var mappingSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetr "NETWORK": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork, "GPU_UTILIZATION": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuUtilization, "GPU_MEMORY_USAGE": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuMemoryUsage, + "IO": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricIo, } var mappingSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnumLowerCase = map[string]SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum{ @@ -91,6 +93,7 @@ var mappingSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetr "network": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricNetwork, "gpu_utilization": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuUtilization, "gpu_memory_usage": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricGpuMemoryUsage, + "io": SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricIo, } // GetSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnumValues Enumerates the set of values for SummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricEnum @@ -112,6 +115,7 @@ func GetSummarizeHostInsightResourceUtilizationInsightAggregationResourceMetricE "NETWORK", "GPU_UTILIZATION", "GPU_MEMORY_USAGE", + "IO", } } diff --git a/vendor/modules.txt b/vendor/modules.txt index e44ea7c14aa..7c65f49647a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -225,7 +225,7 @@ github.com/mitchellh/reflectwalk # github.com/oklog/run v1.0.0 ## explicit github.com/oklog/run -# github.com/oracle/oci-go-sdk/v65 v65.76.0 +# github.com/oracle/oci-go-sdk/v65 v65.76.0 => ./vendor/github.com/oracle/oci-go-sdk ## explicit; go 1.13 github.com/oracle/oci-go-sdk/v65/adm github.com/oracle/oci-go-sdk/v65/aianomalydetection From 010082d131181ca3a1ffb2d406a77e47d7d50712 Mon Sep 17 00:00:00 2001 From: Rakshith Siddanahalli Murukannappa Date: Wed, 23 Oct 2024 15:09:51 -0700 Subject: [PATCH 11/13] Exempted - go fmt updates --- internal/client/object_storage_clients.go | 3 +- internal/client/provider_clients.go | 3 +- ...abase_autonomous_database_resource_test.go | 166 +++++++++--------- .../monitoring_alarm_suppression_test.go | 3 +- ...ibute_security_attribute_namespace_test.go | 3 +- 5 files changed, 91 insertions(+), 87 deletions(-) diff --git a/internal/client/object_storage_clients.go b/internal/client/object_storage_clients.go index 62736015b6f..2245abbe548 100644 --- a/internal/client/object_storage_clients.go +++ b/internal/client/object_storage_clients.go @@ -4,9 +4,10 @@ package client import ( - oci_object_storage "github.com/oracle/oci-go-sdk/v65/objectstorage" "os" + oci_object_storage "github.com/oracle/oci-go-sdk/v65/objectstorage" + oci_common "github.com/oracle/oci-go-sdk/v65/common" ) diff --git a/internal/client/provider_clients.go b/internal/client/provider_clients.go index 1456c730f5e..d14e574596a 100644 --- a/internal/client/provider_clients.go +++ b/internal/client/provider_clients.go @@ -5,10 +5,11 @@ package client import ( "fmt" - "github.com/oracle/terraform-provider-oci/internal/tfresource" "strconv" "strings" + "github.com/oracle/terraform-provider-oci/internal/tfresource" + "github.com/oracle/oci-go-sdk/v65/common" oci_identity_domains "github.com/oracle/oci-go-sdk/v65/identitydomains" diff --git a/internal/integrationtest/database_autonomous_database_resource_test.go b/internal/integrationtest/database_autonomous_database_resource_test.go index 97c59a153dc..2f0fc8f7727 100644 --- a/internal/integrationtest/database_autonomous_database_resource_test.go +++ b/internal/integrationtest/database_autonomous_database_resource_test.go @@ -1682,35 +1682,35 @@ func TestResourceDatabaseAutonomousDatabaseResource_privateEndpoint(t *testing.T compartmentIdVariableStr + AutonomousDatabasePrivateEndpointResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Update, acctest.GetUpdatedRepresentationCopy("nsg_ids", acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group2.id}`}}, autonomousDatabasePrivateEndpointRepresentation)), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(datasourceName, "db_workload", "OLTP"), - resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(datasourceName, "state", "AVAILABLE"), - - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.#", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.compartment_id", compartmentId), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.connection_strings.#", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.cpu_core_count", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.data_storage_size_in_tbs", "1"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_name", adbName), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.db_version"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_workload", "OLTP"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.display_name", "displayName2"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.id"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_auto_scaling_enabled", "false"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_dedicated", "false"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.is_preview"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.nsg_ids.#", "1"), - //resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.private_endpoint"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_ip", "10.0.0.97"), - resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_label", "xlx4fc9y"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.state"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.subnet_id"), - resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.time_created"), - resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), - resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), - ), + resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(datasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "state", "AVAILABLE"), + + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.compartment_id", compartmentId), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.connection_strings.#", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.cpu_core_count", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.data_storage_size_in_tbs", "1"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_name", adbName), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.db_version"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.db_workload", "OLTP"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.display_name", "displayName2"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.id"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.is_dedicated", "false"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.is_preview"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.nsg_ids.#", "1"), + //resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.private_endpoint"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_ip", "10.0.0.97"), + resource.TestCheckResourceAttr(datasourceName, "autonomous_databases.0.private_endpoint_label", "xlx4fc9y"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.state"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.subnet_id"), + resource.TestCheckResourceAttrSet(datasourceName, "autonomous_databases.0.time_created"), + resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), + resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), + ), }, //4. verify singular datasource { @@ -1719,32 +1719,32 @@ func TestResourceDatabaseAutonomousDatabaseResource_privateEndpoint(t *testing.T compartmentIdVariableStr + AutonomousDatabasePrivateEndpointResourceDependencies + acctest.GenerateResourceFromRepresentationMap("oci_database_autonomous_database", "test_autonomous_database", acctest.Optional, acctest.Update, acctest.GetUpdatedRepresentationCopy("nsg_ids", acctest.Representation{RepType: acctest.Optional, Create: []string{`${oci_core_network_security_group.test_network_security_group2.id}`}}, autonomousDatabasePrivateEndpointRepresentation)), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttrSet(singularDatasourceName, "autonomous_database_id"), - - resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(singularDatasourceName, "connection_strings.#", "1"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "connection_strings.0.all_connection_strings.%"), - resource.TestCheckResourceAttr(singularDatasourceName, "cpu_core_count", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "data_storage_size_in_tbs", "1"), - resource.TestCheckResourceAttr(singularDatasourceName, "db_name", adbName), - resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), - resource.TestCheckResourceAttr(singularDatasourceName, "db_workload", "OLTP"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), - resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), - resource.TestCheckResourceAttr(singularDatasourceName, "is_auto_scaling_enabled", "false"), - resource.TestCheckResourceAttr(singularDatasourceName, "is_dedicated", "false"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "is_preview"), - resource.TestCheckResourceAttr(singularDatasourceName, "nsg_ids.#", "1"), - //resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint"), - resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_ip", "10.0.0.97"), - resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_label", "xlx4fc9y"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), - resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), - resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), - resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), - ), + resource.TestCheckResourceAttrSet(singularDatasourceName, "autonomous_database_id"), + + resource.TestCheckResourceAttr(singularDatasourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(singularDatasourceName, "connection_strings.#", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "connection_strings.0.all_connection_strings.%"), + resource.TestCheckResourceAttr(singularDatasourceName, "cpu_core_count", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "data_storage_size_in_tbs", "1"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_name", adbName), + resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), + resource.TestCheckResourceAttr(singularDatasourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "db_version"), + resource.TestCheckResourceAttr(singularDatasourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(singularDatasourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "id"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(singularDatasourceName, "is_dedicated", "false"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "is_preview"), + resource.TestCheckResourceAttr(singularDatasourceName, "nsg_ids.#", "1"), + //resource.TestCheckResourceAttrSet(singularDatasourceName, "private_endpoint"), + resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_ip", "10.0.0.97"), + resource.TestCheckResourceAttr(singularDatasourceName, "private_endpoint_label", "xlx4fc9y"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "state"), + resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"), + resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), + resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), + ), }, //5. delete before next Create @@ -1793,34 +1793,34 @@ func TestResourceDatabaseAutonomousDatabaseResource_privateEndpoint(t *testing.T "private_endpoint_label": acctest.Representation{RepType: acctest.Optional, Create: `xlx4fc9y`}, "subnet_id": acctest.Representation{RepType: acctest.Optional, Create: `${oci_core_subnet.test_subnet.id}`}, }), []string{"whitelisted_ips"})), Check: acctest.ComposeAggregateTestCheckFuncWrapper( - resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#12"), - resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), - resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "1"), - resource.TestCheckResourceAttr(resourceName, "data_storage_size_in_tbs", "1"), - resource.TestCheckResourceAttr(resourceName, "db_name", adbName), - resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), - resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), - resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), - resource.TestCheckResourceAttrSet(resourceName, "id"), - resource.TestCheckResourceAttr(resourceName, "is_auto_scaling_enabled", "false"), - resource.TestCheckResourceAttr(resourceName, "is_dedicated", "false"), - resource.TestCheckResourceAttr(resourceName, "is_preview_version_with_service_terms_accepted", "false"), - resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), - resource.TestCheckResourceAttr(resourceName, "private_endpoint_label", "xlx4fc9y"), - resource.TestCheckResourceAttr(resourceName, "nsg_ids.#", "2"), - resource.TestCheckResourceAttrSet(resourceName, "state"), - resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), - resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), - resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), - - func(s *terraform.State) (err error) { - resId2, err = acctest.FromInstanceState(s, resourceName, "id") - if resId != resId2 { - return fmt.Errorf("Resource recreated when it was supposed to be updated.") - } - return err - }, - ), + resource.TestCheckResourceAttr(resourceName, "admin_password", "BEstrO0ng_#12"), + resource.TestCheckResourceAttr(resourceName, "compartment_id", compartmentId), + resource.TestCheckResourceAttr(resourceName, "cpu_core_count", "1"), + resource.TestCheckResourceAttr(resourceName, "data_storage_size_in_tbs", "1"), + resource.TestCheckResourceAttr(resourceName, "db_name", adbName), + resource.TestCheckResourceAttr(resourceName, "db_workload", "OLTP"), + resource.TestCheckResourceAttr(resourceName, "display_name", "displayName2"), + resource.TestCheckResourceAttr(resourceName, "freeform_tags.%", "1"), + resource.TestCheckResourceAttrSet(resourceName, "id"), + resource.TestCheckResourceAttr(resourceName, "is_auto_scaling_enabled", "false"), + resource.TestCheckResourceAttr(resourceName, "is_dedicated", "false"), + resource.TestCheckResourceAttr(resourceName, "is_preview_version_with_service_terms_accepted", "false"), + resource.TestCheckResourceAttr(resourceName, "license_model", "LICENSE_INCLUDED"), + resource.TestCheckResourceAttr(resourceName, "private_endpoint_label", "xlx4fc9y"), + resource.TestCheckResourceAttr(resourceName, "nsg_ids.#", "2"), + resource.TestCheckResourceAttrSet(resourceName, "state"), + resource.TestCheckResourceAttrSet(resourceName, "subnet_id"), + resource.TestCheckResourceAttr(resourceName, "is_mtls_connection_required", "true"), + resource.TestCheckResourceAttr(resourceName, "connection_strings.0.profiles.#", "3"), + + func(s *terraform.State) (err error) { + resId2, err = acctest.FromInstanceState(s, resourceName, "id") + if resId != resId2 { + return fmt.Errorf("Resource recreated when it was supposed to be updated.") + } + return err + }, + ), }, //8. delete before next Create { diff --git a/internal/integrationtest/monitoring_alarm_suppression_test.go b/internal/integrationtest/monitoring_alarm_suppression_test.go index 8d66701ee59..0fa116c856a 100644 --- a/internal/integrationtest/monitoring_alarm_suppression_test.go +++ b/internal/integrationtest/monitoring_alarm_suppression_test.go @@ -6,11 +6,12 @@ package integrationtest import ( "context" "fmt" - "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" "strconv" "testing" "time" + "github.com/oracle/terraform-provider-oci/internal/resourcediscovery" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" diff --git a/internal/integrationtest/security_attribute_security_attribute_namespace_test.go b/internal/integrationtest/security_attribute_security_attribute_namespace_test.go index 18529c097e2..395d088ecdd 100644 --- a/internal/integrationtest/security_attribute_security_attribute_namespace_test.go +++ b/internal/integrationtest/security_attribute_security_attribute_namespace_test.go @@ -6,11 +6,12 @@ package integrationtest import ( "context" "fmt" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" "strconv" "testing" "time" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/oracle/oci-go-sdk/v65/common" From 9b6db308b758a3585a72496317a64bbbf238c5a3 Mon Sep 17 00:00:00 2001 From: Rakshith Siddanahalli Murukannappa Date: Wed, 23 Oct 2024 16:10:21 -0700 Subject: [PATCH 12/13] Finalize changelog and release for version v6.15.0 --- CHANGELOG.md | 14 ++++++++++++++ internal/globalvar/version.go | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3ada88123d..c38153b07a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## 6.15.0 (Unreleased) + +### Added +- Support for FSS Resource Locking +- Support for ADB-S: Customer Managed Keys via Azure Key Vault and AWS KMS +- Compute support for ZPR +- nlb-cp zpr support +- Support for Add DB 23ai support to Globally Distributed Autonomous Database +- Support for OCI Data Science Model Store Backup and Retention +- Support for FC Redundancy Project +### Bug Fix +- For the ACD Version selection using env variable and vmNetwork should not consider state for calculating hash +- Fixed the timestamp issue to corrected form + ## 6.14.0 (October 16, 2024) ### Added diff --git a/internal/globalvar/version.go b/internal/globalvar/version.go index 5449ac4fdf4..0aa62503d35 100644 --- a/internal/globalvar/version.go +++ b/internal/globalvar/version.go @@ -7,9 +7,9 @@ import ( "log" ) -const Version = "6.14.0" +const Version = "6.15.0" -const ReleaseDate = "2024-10-20" +const ReleaseDate = "2024-10-28" func PrintVersion() { log.Printf("[INFO] terraform-provider-oci %s\n", Version) From b231ef91678b376041cecb80580f2bd18ac2553d Mon Sep 17 00:00:00 2001 From: Sriniakhil Gujulla Leel Date: Wed, 16 Oct 2024 22:48:16 +0530 Subject: [PATCH 13/13] Added - Release for v6.14.0 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c38153b07a7..7a0265c67f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 6.15.0 (Unreleased) +## 6.15.0 (October 23, 2024) ### Added - Support for FSS Resource Locking @@ -8,6 +8,7 @@ - Support for Add DB 23ai support to Globally Distributed Autonomous Database - Support for OCI Data Science Model Store Backup and Retention - Support for FC Redundancy Project + ### Bug Fix - For the ACD Version selection using env variable and vmNetwork should not consider state for calculating hash - Fixed the timestamp issue to corrected form