update_zone_details.go raw

   1  // Copyright (c) 2016, 2018, 2025, Oracle and/or its affiliates.  All rights reserved.
   2  // 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.
   3  // Code generated. DO NOT EDIT.
   4  
   5  // DNS API
   6  //
   7  // API for the DNS service. Use this API to manage DNS zones, records, and other DNS resources.
   8  // For more information, see Overview of the DNS Service (https://docs.oracle.com/iaas/Content/DNS/Concepts/dnszonemanagement.htm).
   9  //
  10  
  11  package dns
  12  
  13  import (
  14  	"fmt"
  15  	"strings"
  16  
  17  	"github.com/nrdcg/oci-go-sdk/common/v1065"
  18  )
  19  
  20  // UpdateZoneDetails The body for updating a zone.
  21  // **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
  22  type UpdateZoneDetails struct {
  23  
  24  	// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
  25  	// For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
  26  	//
  27  	// **Example:** `{"Department": "Finance"}`
  28  	FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
  29  
  30  	// Defined tags for this resource. Each key is predefined and scoped to a namespace.
  31  	// For more information, see Resource Tags (https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
  32  	//
  33  	// **Example:** `{"Operations": {"CostCenter": "42"}}`
  34  	DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
  35  
  36  	// The state of DNSSEC on the zone.
  37  	// For DNSSEC to function, every parent zone in the DNS tree up to the top-level domain (or an independent
  38  	// trust anchor) must also have DNSSEC correctly set up.
  39  	// After enabling DNSSEC, you must add a DS record to the zone's parent zone containing the
  40  	// `KskDnssecKeyVersion` data. You can find the DS data in the `dsData` attribute of the `KskDnssecKeyVersion`.
  41  	// Then, use the `PromoteZoneDnssecKeyVersion` operation to promote the `KskDnssecKeyVersion`.
  42  	// New `KskDnssecKeyVersion`s are generated annually, a week before the existing `KskDnssecKeyVersion`'s expiration.
  43  	// To rollover a `KskDnssecKeyVersion`, you must replace the parent zone's DS record containing the old
  44  	// `KskDnssecKeyVersion` data with the data from the new `KskDnssecKeyVersion`.
  45  	// To remove the old DS record without causing service disruption, wait until the old DS record's TTL has
  46  	// expired, and the new DS record has propagated. After the DS replacement has been completed, then the
  47  	// `PromoteZoneDnssecKeyVersion` operation must be called.
  48  	// Metrics are emitted in the `oci_dns` namespace daily for each `KskDnssecKeyVersion` indicating how many
  49  	// days are left until expiration.
  50  	// We recommend that you set up alarms and notifications for KskDnssecKeyVersion expiration so that the
  51  	// necessary parent zone updates can be made and the `PromoteZoneDnssecKeyVersion` operation can be called.
  52  	// Enabling DNSSEC results in additional records in DNS responses which increases their size and can
  53  	// cause higher response latency.
  54  	// For more information, see DNSSEC (https://docs.oracle.com/iaas/Content/DNS/Concepts/dnssec.htm).
  55  	DnssecState ZoneDnssecStateEnum `mandatory:"false" json:"dnssecState,omitempty"`
  56  
  57  	// External master servers for the zone. `externalMasters` becomes a
  58  	// required parameter when the `zoneType` value is `SECONDARY`.
  59  	ExternalMasters []ExternalMaster `mandatory:"false" json:"externalMasters"`
  60  
  61  	// External secondary servers for the zone.
  62  	// This field is currently not supported when `zoneType` is `SECONDARY` or `scope` is `PRIVATE`.
  63  	ExternalDownstreams []ExternalDownstream `mandatory:"false" json:"externalDownstreams"`
  64  }
  65  
  66  func (m UpdateZoneDetails) String() string {
  67  	return common.PointerString(m)
  68  }
  69  
  70  // ValidateEnumValue returns an error when providing an unsupported enum value
  71  // This function is being called during constructing API request process
  72  // Not recommended for calling this function directly
  73  func (m UpdateZoneDetails) ValidateEnumValue() (bool, error) {
  74  	errMessage := []string{}
  75  
  76  	if _, ok := GetMappingZoneDnssecStateEnum(string(m.DnssecState)); !ok && m.DnssecState != "" {
  77  		errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for DnssecState: %s. Supported values are: %s.", m.DnssecState, strings.Join(GetZoneDnssecStateEnumStringValues(), ",")))
  78  	}
  79  	if len(errMessage) > 0 {
  80  		return true, fmt.Errorf("%s", strings.Join(errMessage, "\n"))
  81  	}
  82  	return false, nil
  83  }
  84