README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones
Documentation
The zones
SDK allows for interaction with the Azure Resource Manager Service dns
(API Version 2018-05-01
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones"
Client Initialization
client := zones.NewZonesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: ZonesClient.CreateOrUpdate
ctx := context.TODO()
id := zones.NewDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsZoneValue")
payload := zones.Zone{
// ...
}
read, err := client.CreateOrUpdate(ctx, id, payload, zones.DefaultCreateOrUpdateOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ZonesClient.Delete
ctx := context.TODO()
id := zones.NewDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsZoneValue")
if err := client.DeleteThenPoll(ctx, id, zones.DefaultDeleteOperationOptions()); err != nil {
// handle the error
}
Example Usage: ZonesClient.Get
ctx := context.TODO()
id := zones.NewDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsZoneValue")
read, err := client.Get(ctx, id)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Example Usage: ZonesClient.List
ctx := context.TODO()
id := zones.NewSubscriptionID("12345678-1234-9876-4563-123456789012")
// alternatively `client.List(ctx, id, zones.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, zones.DefaultListOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ZonesClient.ListByResourceGroup
ctx := context.TODO()
id := zones.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")
// alternatively `client.ListByResourceGroup(ctx, id, zones.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id, zones.DefaultListByResourceGroupOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Example Usage: ZonesClient.Update
ctx := context.TODO()
id := zones.NewDnsZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsZoneValue")
payload := zones.ZoneUpdate{
// ...
}
read, err := client.Update(ctx, id, payload, zones.DefaultUpdateOperationOptions())
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation ¶
Index ¶
- func PossibleValuesForZoneType() []string
- func ValidateDnsZoneID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOrUpdateOperationOptions
- type CreateOrUpdateOperationResponse
- type DeleteOperationOptions
- type DeleteOperationResponse
- type DnsZoneId
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationOptions
- type ListByResourceGroupOperationResponse
- type ListCompleteResult
- type ListOperationOptions
- type ListOperationResponse
- type SubResource
- type UpdateOperationOptions
- type UpdateOperationResponse
- type Zone
- type ZoneOperationPredicate
- type ZoneProperties
- type ZoneType
- type ZoneUpdate
- type ZonesClient
- func (c ZonesClient) CreateOrUpdate(ctx context.Context, id DnsZoneId, input Zone, ...) (result CreateOrUpdateOperationResponse, err error)
- func (c ZonesClient) Delete(ctx context.Context, id DnsZoneId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
- func (c ZonesClient) DeleteThenPoll(ctx context.Context, id DnsZoneId, options DeleteOperationOptions) error
- func (c ZonesClient) Get(ctx context.Context, id DnsZoneId) (result GetOperationResponse, err error)
- func (c ZonesClient) List(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (result ListOperationResponse, err error)
- func (c ZonesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupOperationResponse, err error)
- func (c ZonesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, ...) (ListByResourceGroupCompleteResult, error)
- func (c ZonesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c ZonesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (ListCompleteResult, error)
- func (c ZonesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, ...) (result ListCompleteResult, err error)
- func (c ZonesClient) Update(ctx context.Context, id DnsZoneId, input ZoneUpdate, ...) (result UpdateOperationResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForZoneType ¶
func PossibleValuesForZoneType() []string
func ValidateDnsZoneID ¶
ValidateDnsZoneID checks that 'input' can be parsed as a Dns Zone ID
Types ¶
type CreateOrUpdateOperationOptions ¶
func DefaultCreateOrUpdateOperationOptions ¶
func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions
func (CreateOrUpdateOperationOptions) ToHeaders ¶ added in v0.20230227.1195936
func (o CreateOrUpdateOperationOptions) ToHeaders() *client.Headers
func (CreateOrUpdateOperationOptions) ToOData ¶ added in v0.20230227.1195936
func (o CreateOrUpdateOperationOptions) ToOData() *odata.Query
func (CreateOrUpdateOperationOptions) ToQuery ¶ added in v0.20230227.1195936
func (o CreateOrUpdateOperationOptions) ToQuery() *client.QueryParams
type DeleteOperationOptions ¶
type DeleteOperationOptions struct {
IfMatch *string
}
func DefaultDeleteOperationOptions ¶
func DefaultDeleteOperationOptions() DeleteOperationOptions
func (DeleteOperationOptions) ToHeaders ¶ added in v0.20230227.1195936
func (o DeleteOperationOptions) ToHeaders() *client.Headers
func (DeleteOperationOptions) ToOData ¶ added in v0.20230227.1195936
func (o DeleteOperationOptions) ToOData() *odata.Query
func (DeleteOperationOptions) ToQuery ¶ added in v0.20230227.1195936
func (o DeleteOperationOptions) ToQuery() *client.QueryParams
type DeleteOperationResponse ¶
type DnsZoneId ¶
DnsZoneId is a struct representing the Resource ID for a Dns Zone
func NewDnsZoneID ¶
NewDnsZoneID returns a new DnsZoneId struct
func ParseDnsZoneID ¶
ParseDnsZoneID parses 'input' into a DnsZoneId
func ParseDnsZoneIDInsensitively ¶
ParseDnsZoneIDInsensitively parses 'input' case-insensitively into a DnsZoneId note: this method should only be used for API response data and not user input
func (DnsZoneId) Segments ¶
func (id DnsZoneId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Dns Zone ID
type GetOperationResponse ¶
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []Zone
}
type ListByResourceGroupOperationOptions ¶
type ListByResourceGroupOperationOptions struct {
Top *int64
}
func DefaultListByResourceGroupOperationOptions ¶
func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions
func (ListByResourceGroupOperationOptions) ToHeaders ¶ added in v0.20230227.1195936
func (o ListByResourceGroupOperationOptions) ToHeaders() *client.Headers
func (ListByResourceGroupOperationOptions) ToOData ¶ added in v0.20230227.1195936
func (o ListByResourceGroupOperationOptions) ToOData() *odata.Query
func (ListByResourceGroupOperationOptions) ToQuery ¶ added in v0.20230227.1195936
func (o ListByResourceGroupOperationOptions) ToQuery() *client.QueryParams
type ListCompleteResult ¶
type ListCompleteResult struct {
Items []Zone
}
type ListOperationOptions ¶
type ListOperationOptions struct {
Top *int64
}
func DefaultListOperationOptions ¶
func DefaultListOperationOptions() ListOperationOptions
func (ListOperationOptions) ToHeaders ¶ added in v0.20230227.1195936
func (o ListOperationOptions) ToHeaders() *client.Headers
func (ListOperationOptions) ToOData ¶ added in v0.20230227.1195936
func (o ListOperationOptions) ToOData() *odata.Query
func (ListOperationOptions) ToQuery ¶ added in v0.20230227.1195936
func (o ListOperationOptions) ToQuery() *client.QueryParams
type ListOperationResponse ¶
type SubResource ¶
type SubResource struct {
Id *string `json:"id,omitempty"`
}
type UpdateOperationOptions ¶
type UpdateOperationOptions struct {
IfMatch *string
}
func DefaultUpdateOperationOptions ¶
func DefaultUpdateOperationOptions() UpdateOperationOptions
func (UpdateOperationOptions) ToHeaders ¶ added in v0.20230227.1195936
func (o UpdateOperationOptions) ToHeaders() *client.Headers
func (UpdateOperationOptions) ToOData ¶ added in v0.20230227.1195936
func (o UpdateOperationOptions) ToOData() *odata.Query
func (UpdateOperationOptions) ToQuery ¶ added in v0.20230227.1195936
func (o UpdateOperationOptions) ToQuery() *client.QueryParams
type UpdateOperationResponse ¶
type Zone ¶
type Zone struct { Etag *string `json:"etag,omitempty"` Id *string `json:"id,omitempty"` Location string `json:"location"` Name *string `json:"name,omitempty"` Properties *ZoneProperties `json:"properties,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
type ZoneOperationPredicate ¶
type ZoneOperationPredicate struct { Etag *string Id *string Location *string Name *string Type *string }
func (ZoneOperationPredicate) Matches ¶
func (p ZoneOperationPredicate) Matches(input Zone) bool
type ZoneProperties ¶
type ZoneProperties struct { MaxNumberOfRecordSets *int64 `json:"maxNumberOfRecordSets,omitempty"` MaxNumberOfRecordsPerRecordSet *int64 `json:"maxNumberOfRecordsPerRecordSet,omitempty"` NameServers *[]string `json:"nameServers,omitempty"` NumberOfRecordSets *int64 `json:"numberOfRecordSets,omitempty"` RegistrationVirtualNetworks *[]SubResource `json:"registrationVirtualNetworks,omitempty"` ResolutionVirtualNetworks *[]SubResource `json:"resolutionVirtualNetworks,omitempty"` ZoneType *ZoneType `json:"zoneType,omitempty"` }
type ZoneUpdate ¶
type ZonesClient ¶
type ZonesClient struct {
Client *resourcemanager.Client
}
func NewZonesClientWithBaseURI ¶
func NewZonesClientWithBaseURI(api environments.Api) (*ZonesClient, error)
func (ZonesClient) CreateOrUpdate ¶
func (c ZonesClient) CreateOrUpdate(ctx context.Context, id DnsZoneId, input Zone, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (ZonesClient) Delete ¶
func (c ZonesClient) Delete(ctx context.Context, id DnsZoneId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)
Delete ...
func (ZonesClient) DeleteThenPoll ¶
func (c ZonesClient) DeleteThenPoll(ctx context.Context, id DnsZoneId, options DeleteOperationOptions) error
DeleteThenPoll performs Delete then polls until it's completed
func (ZonesClient) Get ¶
func (c ZonesClient) Get(ctx context.Context, id DnsZoneId) (result GetOperationResponse, err error)
Get ...
func (ZonesClient) List ¶
func (c ZonesClient) List(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (result ListOperationResponse, err error)
List ...
func (ZonesClient) ListByResourceGroup ¶
func (c ZonesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (ZonesClient) ListByResourceGroupComplete ¶
func (c ZonesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all the results into a single object
func (ZonesClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c ZonesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ZoneOperationPredicate) (result ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (ZonesClient) ListComplete ¶
func (c ZonesClient) ListComplete(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions) (ListCompleteResult, error)
ListComplete retrieves all the results into a single object
func (ZonesClient) ListCompleteMatchingPredicate ¶
func (c ZonesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate ZoneOperationPredicate) (result ListCompleteResult, err error)
ListCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (ZonesClient) Update ¶
func (c ZonesClient) Update(ctx context.Context, id DnsZoneId, input ZoneUpdate, options UpdateOperationOptions) (result UpdateOperationResponse, err error)
Update ...