zonesv1

package
v0.46.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 10

Documentation

Overview

Package zonesv1 : Operations and models for the ZonesV1 service

Index

Constants

View Source
const (
	CreateZoneOptions_Type_Full    = "full"
	CreateZoneOptions_Type_Partial = "partial"
)

Constants associated with the CreateZoneOptions.Type property. zone type.

View Source
const DefaultServiceName = "zones"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://api.cis.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

func GetServiceURLForRegion added in v0.12.1

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalDeleteZoneResp

func UnmarshalDeleteZoneResp(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeleteZoneResp unmarshals an instance of DeleteZoneResp from the specified map of raw messages.

func UnmarshalDeleteZoneRespResult

func UnmarshalDeleteZoneRespResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeleteZoneRespResult unmarshals an instance of DeleteZoneRespResult from the specified map of raw messages.

func UnmarshalListZonesResp

func UnmarshalListZonesResp(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListZonesResp unmarshals an instance of ListZonesResp from the specified map of raw messages.

func UnmarshalResultInfo

func UnmarshalResultInfo(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResultInfo unmarshals an instance of ResultInfo from the specified map of raw messages.

func UnmarshalZoneActivationcheckResp

func UnmarshalZoneActivationcheckResp(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalZoneActivationcheckResp unmarshals an instance of ZoneActivationcheckResp from the specified map of raw messages.

func UnmarshalZoneActivationcheckRespResult

func UnmarshalZoneActivationcheckRespResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalZoneActivationcheckRespResult unmarshals an instance of ZoneActivationcheckRespResult from the specified map of raw messages.

func UnmarshalZoneDetails

func UnmarshalZoneDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalZoneDetails unmarshals an instance of ZoneDetails from the specified map of raw messages.

func UnmarshalZoneResp

func UnmarshalZoneResp(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalZoneResp unmarshals an instance of ZoneResp from the specified map of raw messages.

Types

type CreateZoneOptions

type CreateZoneOptions struct {
	// name.
	Name *string `json:"name,omitempty"`

	// zone type.
	Type *string `json:"type,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateZoneOptions : The CreateZone options.

func (*CreateZoneOptions) SetHeaders

func (options *CreateZoneOptions) SetHeaders(param map[string]string) *CreateZoneOptions

SetHeaders : Allow user to set Headers

func (*CreateZoneOptions) SetName

func (_options *CreateZoneOptions) SetName(name string) *CreateZoneOptions

SetName : Allow user to set Name

func (*CreateZoneOptions) SetType added in v0.32.0

func (_options *CreateZoneOptions) SetType(typeVar string) *CreateZoneOptions

SetType : Allow user to set Type

type DeleteZoneOptions

type DeleteZoneOptions struct {
	// Identifier of zone.
	ZoneIdentifier *string `json:"zone_identifier" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteZoneOptions : The DeleteZone options.

func (*DeleteZoneOptions) SetHeaders

func (options *DeleteZoneOptions) SetHeaders(param map[string]string) *DeleteZoneOptions

SetHeaders : Allow user to set Headers

func (*DeleteZoneOptions) SetZoneIdentifier

func (_options *DeleteZoneOptions) SetZoneIdentifier(zoneIdentifier string) *DeleteZoneOptions

SetZoneIdentifier : Allow user to set ZoneIdentifier

type DeleteZoneResp

type DeleteZoneResp struct {
	// success.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// result.
	Result *DeleteZoneRespResult `json:"result" validate:"required"`
}

DeleteZoneResp : delete zone response.

type DeleteZoneRespResult

type DeleteZoneRespResult struct {
	// id.
	ID *string `json:"id" validate:"required"`
}

DeleteZoneRespResult : result.

type GetZoneOptions

type GetZoneOptions struct {
	// Zone identifier.
	ZoneIdentifier *string `json:"zone_identifier" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetZoneOptions : The GetZone options.

func (*GetZoneOptions) SetHeaders

func (options *GetZoneOptions) SetHeaders(param map[string]string) *GetZoneOptions

SetHeaders : Allow user to set Headers

func (*GetZoneOptions) SetZoneIdentifier

func (_options *GetZoneOptions) SetZoneIdentifier(zoneIdentifier string) *GetZoneOptions

SetZoneIdentifier : Allow user to set ZoneIdentifier

type ListZonesOptions

type ListZonesOptions struct {
	// Page number of paginated results.
	Page *int64 `json:"page,omitempty"`

	// Maximum number of zones per page.
	PerPage *int64 `json:"per_page,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListZonesOptions : The ListZones options.

func (*ListZonesOptions) SetHeaders

func (options *ListZonesOptions) SetHeaders(param map[string]string) *ListZonesOptions

SetHeaders : Allow user to set Headers

func (*ListZonesOptions) SetPage added in v0.7.0

func (_options *ListZonesOptions) SetPage(page int64) *ListZonesOptions

SetPage : Allow user to set Page

func (*ListZonesOptions) SetPerPage added in v0.7.0

func (_options *ListZonesOptions) SetPerPage(perPage int64) *ListZonesOptions

SetPerPage : Allow user to set PerPage

type ListZonesResp

type ListZonesResp struct {
	// success.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// zone list.
	Result []ZoneDetails `json:"result" validate:"required"`

	// result information.
	ResultInfo *ResultInfo `json:"result_info" validate:"required"`
}

ListZonesResp : list zones response.

type ResultInfo

type ResultInfo struct {
	// page.
	Page *int64 `json:"page" validate:"required"`

	// per page.
	PerPage *int64 `json:"per_page" validate:"required"`

	// count.
	Count *int64 `json:"count" validate:"required"`

	// total count.
	TotalCount *int64 `json:"total_count" validate:"required"`
}

ResultInfo : result information.

type UpdateZoneOptions

type UpdateZoneOptions struct {
	// Zone identifier.
	ZoneIdentifier *string `json:"zone_identifier" validate:"required,ne="`

	// paused.
	Paused *bool `json:"paused,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateZoneOptions : The UpdateZone options.

func (*UpdateZoneOptions) SetHeaders

func (options *UpdateZoneOptions) SetHeaders(param map[string]string) *UpdateZoneOptions

SetHeaders : Allow user to set Headers

func (*UpdateZoneOptions) SetPaused

func (_options *UpdateZoneOptions) SetPaused(paused bool) *UpdateZoneOptions

SetPaused : Allow user to set Paused

func (*UpdateZoneOptions) SetZoneIdentifier

func (_options *UpdateZoneOptions) SetZoneIdentifier(zoneIdentifier string) *UpdateZoneOptions

SetZoneIdentifier : Allow user to set ZoneIdentifier

type ZoneActivationCheckOptions

type ZoneActivationCheckOptions struct {
	// Identifier of zone.
	ZoneIdentifier *string `json:"zone_identifier" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ZoneActivationCheckOptions : The ZoneActivationCheck options.

func (*ZoneActivationCheckOptions) SetHeaders

func (options *ZoneActivationCheckOptions) SetHeaders(param map[string]string) *ZoneActivationCheckOptions

SetHeaders : Allow user to set Headers

func (*ZoneActivationCheckOptions) SetZoneIdentifier

func (_options *ZoneActivationCheckOptions) SetZoneIdentifier(zoneIdentifier string) *ZoneActivationCheckOptions

SetZoneIdentifier : Allow user to set ZoneIdentifier

type ZoneActivationcheckResp

type ZoneActivationcheckResp struct {
	// success.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// result.
	Result *ZoneActivationcheckRespResult `json:"result" validate:"required"`
}

ZoneActivationcheckResp : zone activation check response.

type ZoneActivationcheckRespResult

type ZoneActivationcheckRespResult struct {
	// id.
	ID *string `json:"id" validate:"required"`
}

ZoneActivationcheckRespResult : result.

type ZoneDetails

type ZoneDetails struct {
	// id.
	ID *string `json:"id,omitempty"`

	// created date.
	CreatedOn *string `json:"created_on,omitempty"`

	// modified date.
	ModifiedOn *string `json:"modified_on,omitempty"`

	// name.
	Name *string `json:"name,omitempty"`

	// original registrar.
	OriginalRegistrar *string `json:"original_registrar,omitempty"`

	// orginal dns host.
	OriginalDnshost *string `json:"original_dnshost,omitempty"`

	// status.
	Status *string `json:"status,omitempty"`

	// paused.
	Paused *bool `json:"paused,omitempty"`

	// orginal name servers.
	OriginalNameServers []string `json:"original_name_servers,omitempty"`

	// name servers.
	NameServers []string `json:"name_servers,omitempty"`

	// zone type.
	Type *string `json:"type,omitempty"`

	// verification key.
	VerificationKey *string `json:"verification_key,omitempty"`

	// canme suffix.
	CnameSuffix *string `json:"cname_suffix,omitempty"`
}

ZoneDetails : zone details.

type ZoneResp

type ZoneResp struct {
	// success.
	Success *bool `json:"success" validate:"required"`

	// errors.
	Errors [][]string `json:"errors" validate:"required"`

	// messages.
	Messages [][]string `json:"messages" validate:"required"`

	// zone details.
	Result *ZoneDetails `json:"result" validate:"required"`
}

ZoneResp : zone response.

type ZonesV1

type ZonesV1 struct {
	Service *core.BaseService

	// Full url-encoded CRN of the service instance.
	Crn *string
}

ZonesV1 : CIS Zones

API Version: 1.0.1

func NewZonesV1

func NewZonesV1(options *ZonesV1Options) (service *ZonesV1, err error)

NewZonesV1 : constructs an instance of ZonesV1 with passed in options.

func NewZonesV1UsingExternalConfig

func NewZonesV1UsingExternalConfig(options *ZonesV1Options) (zones *ZonesV1, err error)

NewZonesV1UsingExternalConfig : constructs an instance of ZonesV1 with passed in options and external configuration.

func (*ZonesV1) Clone added in v0.12.1

func (zones *ZonesV1) Clone() *ZonesV1

Clone makes a copy of "zones" suitable for processing requests.

func (*ZonesV1) CreateZone

func (zones *ZonesV1) CreateZone(createZoneOptions *CreateZoneOptions) (result *ZoneResp, response *core.DetailedResponse, err error)

CreateZone : Create zone Add a new zone for a given service instance.

func (*ZonesV1) CreateZoneWithContext added in v0.12.1

func (zones *ZonesV1) CreateZoneWithContext(ctx context.Context, createZoneOptions *CreateZoneOptions) (result *ZoneResp, response *core.DetailedResponse, err error)

CreateZoneWithContext is an alternate form of the CreateZone method which supports a Context parameter

func (*ZonesV1) DeleteZone

func (zones *ZonesV1) DeleteZone(deleteZoneOptions *DeleteZoneOptions) (result *DeleteZoneResp, response *core.DetailedResponse, err error)

DeleteZone : Delete zone Delete a zone given its id.

func (*ZonesV1) DeleteZoneWithContext added in v0.12.1

func (zones *ZonesV1) DeleteZoneWithContext(ctx context.Context, deleteZoneOptions *DeleteZoneOptions) (result *DeleteZoneResp, response *core.DetailedResponse, err error)

DeleteZoneWithContext is an alternate form of the DeleteZone method which supports a Context parameter

func (*ZonesV1) DisableRetries added in v0.12.1

func (zones *ZonesV1) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*ZonesV1) EnableRetries added in v0.12.1

func (zones *ZonesV1) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*ZonesV1) GetEnableGzipCompression added in v0.12.1

func (zones *ZonesV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*ZonesV1) GetServiceURL added in v0.12.1

func (zones *ZonesV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*ZonesV1) GetZone

func (zones *ZonesV1) GetZone(getZoneOptions *GetZoneOptions) (result *ZoneResp, response *core.DetailedResponse, err error)

GetZone : Get zone Get the details of a zone for a given service instance and given zone id.

func (*ZonesV1) GetZoneWithContext added in v0.12.1

func (zones *ZonesV1) GetZoneWithContext(ctx context.Context, getZoneOptions *GetZoneOptions) (result *ZoneResp, response *core.DetailedResponse, err error)

GetZoneWithContext is an alternate form of the GetZone method which supports a Context parameter

func (*ZonesV1) ListZones

func (zones *ZonesV1) ListZones(listZonesOptions *ListZonesOptions) (result *ListZonesResp, response *core.DetailedResponse, err error)

ListZones : List all zones List all zones for a service instance.

func (*ZonesV1) ListZonesWithContext added in v0.12.1

func (zones *ZonesV1) ListZonesWithContext(ctx context.Context, listZonesOptions *ListZonesOptions) (result *ListZonesResp, response *core.DetailedResponse, err error)

ListZonesWithContext is an alternate form of the ListZones method which supports a Context parameter

func (*ZonesV1) NewCreateZoneOptions

func (*ZonesV1) NewCreateZoneOptions() *CreateZoneOptions

NewCreateZoneOptions : Instantiate CreateZoneOptions

func (*ZonesV1) NewDeleteZoneOptions

func (*ZonesV1) NewDeleteZoneOptions(zoneIdentifier string) *DeleteZoneOptions

NewDeleteZoneOptions : Instantiate DeleteZoneOptions

func (*ZonesV1) NewGetZoneOptions

func (*ZonesV1) NewGetZoneOptions(zoneIdentifier string) *GetZoneOptions

NewGetZoneOptions : Instantiate GetZoneOptions

func (*ZonesV1) NewListZonesOptions

func (*ZonesV1) NewListZonesOptions() *ListZonesOptions

NewListZonesOptions : Instantiate ListZonesOptions

func (*ZonesV1) NewUpdateZoneOptions

func (*ZonesV1) NewUpdateZoneOptions(zoneIdentifier string) *UpdateZoneOptions

NewUpdateZoneOptions : Instantiate UpdateZoneOptions

func (*ZonesV1) NewZoneActivationCheckOptions

func (*ZonesV1) NewZoneActivationCheckOptions(zoneIdentifier string) *ZoneActivationCheckOptions

NewZoneActivationCheckOptions : Instantiate ZoneActivationCheckOptions

func (*ZonesV1) SetDefaultHeaders added in v0.12.1

func (zones *ZonesV1) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*ZonesV1) SetEnableGzipCompression added in v0.12.1

func (zones *ZonesV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*ZonesV1) SetServiceURL

func (zones *ZonesV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*ZonesV1) UpdateZone

func (zones *ZonesV1) UpdateZone(updateZoneOptions *UpdateZoneOptions) (result *ZoneResp, response *core.DetailedResponse, err error)

UpdateZone : Update zone Update the paused field of the zone.

func (*ZonesV1) UpdateZoneWithContext added in v0.12.1

func (zones *ZonesV1) UpdateZoneWithContext(ctx context.Context, updateZoneOptions *UpdateZoneOptions) (result *ZoneResp, response *core.DetailedResponse, err error)

UpdateZoneWithContext is an alternate form of the UpdateZone method which supports a Context parameter

func (*ZonesV1) ZoneActivationCheck

func (zones *ZonesV1) ZoneActivationCheck(zoneActivationCheckOptions *ZoneActivationCheckOptions) (result *ZoneActivationcheckResp, response *core.DetailedResponse, err error)

ZoneActivationCheck : Check zone Perform activation check on zone for status.

func (*ZonesV1) ZoneActivationCheckWithContext added in v0.12.1

func (zones *ZonesV1) ZoneActivationCheckWithContext(ctx context.Context, zoneActivationCheckOptions *ZoneActivationCheckOptions) (result *ZoneActivationcheckResp, response *core.DetailedResponse, err error)

ZoneActivationCheckWithContext is an alternate form of the ZoneActivationCheck method which supports a Context parameter

type ZonesV1Options

type ZonesV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator

	// Full url-encoded CRN of the service instance.
	Crn *string `validate:"required"`
}

ZonesV1Options : Service options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL