Documentation ¶
Index ¶
- type CloudError
- type CloudErrorBody
- type CreatedByType
- type DNSForwardingRuleset
- type DNSForwardingRulesetListResult
- type DNSForwardingRulesetPatch
- type DNSForwardingRulesetProperties
- type DNSForwardingRulesetsClient
- func (client *DNSForwardingRulesetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (*runtime.Poller[DNSForwardingRulesetsClientCreateOrUpdateResponse], error)
- func (client *DNSForwardingRulesetsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (*runtime.Poller[DNSForwardingRulesetsClientDeleteResponse], error)
- func (client *DNSForwardingRulesetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (*runtime.Poller[DNSForwardingRulesetsClientUpdateResponse], error)
- func (client *DNSForwardingRulesetsClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (DNSForwardingRulesetsClientGetResponse, error)
- func (client *DNSForwardingRulesetsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[DNSForwardingRulesetsClientListByResourceGroupResponse]
- func (client *DNSForwardingRulesetsClient) NewListByVirtualNetworkPager(resourceGroupName string, virtualNetworkName string, ...) *runtime.Pager[DNSForwardingRulesetsClientListByVirtualNetworkResponse]
- func (client *DNSForwardingRulesetsClient) NewListPager(options *DNSForwardingRulesetsClientListOptions) *runtime.Pager[DNSForwardingRulesetsClientListResponse]
- type DNSForwardingRulesetsClientBeginCreateOrUpdateOptions
- type DNSForwardingRulesetsClientBeginDeleteOptions
- type DNSForwardingRulesetsClientBeginUpdateOptions
- type DNSForwardingRulesetsClientCreateOrUpdateResponse
- type DNSForwardingRulesetsClientDeleteResponse
- type DNSForwardingRulesetsClientGetOptions
- type DNSForwardingRulesetsClientGetResponse
- type DNSForwardingRulesetsClientListByResourceGroupOptions
- type DNSForwardingRulesetsClientListByResourceGroupResponse
- type DNSForwardingRulesetsClientListByVirtualNetworkOptions
- type DNSForwardingRulesetsClientListByVirtualNetworkResponse
- type DNSForwardingRulesetsClientListOptions
- type DNSForwardingRulesetsClientListResponse
- type DNSForwardingRulesetsClientUpdateResponse
- type DNSResolver
- type DNSResolverState
- type DNSResolversClient
- func (client *DNSResolversClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[DNSResolversClientCreateOrUpdateResponse], error)
- func (client *DNSResolversClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[DNSResolversClientDeleteResponse], error)
- func (client *DNSResolversClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[DNSResolversClientUpdateResponse], error)
- func (client *DNSResolversClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (DNSResolversClientGetResponse, error)
- func (client *DNSResolversClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[DNSResolversClientListByResourceGroupResponse]
- func (client *DNSResolversClient) NewListByVirtualNetworkPager(resourceGroupName string, virtualNetworkName string, ...) *runtime.Pager[DNSResolversClientListByVirtualNetworkResponse]
- func (client *DNSResolversClient) NewListPager(options *DNSResolversClientListOptions) *runtime.Pager[DNSResolversClientListResponse]
- type DNSResolversClientBeginCreateOrUpdateOptions
- type DNSResolversClientBeginDeleteOptions
- type DNSResolversClientBeginUpdateOptions
- type DNSResolversClientCreateOrUpdateResponse
- type DNSResolversClientDeleteResponse
- type DNSResolversClientGetOptions
- type DNSResolversClientGetResponse
- type DNSResolversClientListByResourceGroupOptions
- type DNSResolversClientListByResourceGroupResponse
- type DNSResolversClientListByVirtualNetworkOptions
- type DNSResolversClientListByVirtualNetworkResponse
- type DNSResolversClientListOptions
- type DNSResolversClientListResponse
- type DNSResolversClientUpdateResponse
- type ForwardingRule
- type ForwardingRuleListResult
- type ForwardingRulePatch
- type ForwardingRulePatchProperties
- type ForwardingRuleProperties
- type ForwardingRuleState
- type ForwardingRulesClient
- func (client *ForwardingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (ForwardingRulesClientCreateOrUpdateResponse, error)
- func (client *ForwardingRulesClient) Delete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (ForwardingRulesClientDeleteResponse, error)
- func (client *ForwardingRulesClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (ForwardingRulesClientGetResponse, error)
- func (client *ForwardingRulesClient) NewListPager(resourceGroupName string, dnsForwardingRulesetName string, ...) *runtime.Pager[ForwardingRulesClientListResponse]
- func (client *ForwardingRulesClient) Update(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (ForwardingRulesClientUpdateResponse, error)
- type ForwardingRulesClientCreateOrUpdateOptions
- type ForwardingRulesClientCreateOrUpdateResponse
- type ForwardingRulesClientDeleteOptions
- type ForwardingRulesClientDeleteResponse
- type ForwardingRulesClientGetOptions
- type ForwardingRulesClientGetResponse
- type ForwardingRulesClientListOptions
- type ForwardingRulesClientListResponse
- type ForwardingRulesClientUpdateOptions
- type ForwardingRulesClientUpdateResponse
- type IPAllocationMethod
- type IPConfiguration
- type InboundEndpoint
- type InboundEndpointListResult
- type InboundEndpointPatch
- type InboundEndpointProperties
- type InboundEndpointsClient
- func (client *InboundEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[InboundEndpointsClientCreateOrUpdateResponse], error)
- func (client *InboundEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[InboundEndpointsClientDeleteResponse], error)
- func (client *InboundEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[InboundEndpointsClientUpdateResponse], error)
- func (client *InboundEndpointsClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (InboundEndpointsClientGetResponse, error)
- func (client *InboundEndpointsClient) NewListPager(resourceGroupName string, dnsResolverName string, ...) *runtime.Pager[InboundEndpointsClientListResponse]
- type InboundEndpointsClientBeginCreateOrUpdateOptions
- type InboundEndpointsClientBeginDeleteOptions
- type InboundEndpointsClientBeginUpdateOptions
- type InboundEndpointsClientCreateOrUpdateResponse
- type InboundEndpointsClientDeleteResponse
- type InboundEndpointsClientGetOptions
- type InboundEndpointsClientGetResponse
- type InboundEndpointsClientListOptions
- type InboundEndpointsClientListResponse
- type InboundEndpointsClientUpdateResponse
- type ListResult
- type OutboundEndpoint
- type OutboundEndpointListResult
- type OutboundEndpointPatch
- type OutboundEndpointProperties
- type OutboundEndpointsClient
- func (client *OutboundEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[OutboundEndpointsClientCreateOrUpdateResponse], error)
- func (client *OutboundEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[OutboundEndpointsClientDeleteResponse], error)
- func (client *OutboundEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (*runtime.Poller[OutboundEndpointsClientUpdateResponse], error)
- func (client *OutboundEndpointsClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, ...) (OutboundEndpointsClientGetResponse, error)
- func (client *OutboundEndpointsClient) NewListPager(resourceGroupName string, dnsResolverName string, ...) *runtime.Pager[OutboundEndpointsClientListResponse]
- type OutboundEndpointsClientBeginCreateOrUpdateOptions
- type OutboundEndpointsClientBeginDeleteOptions
- type OutboundEndpointsClientBeginUpdateOptions
- type OutboundEndpointsClientCreateOrUpdateResponse
- type OutboundEndpointsClientDeleteResponse
- type OutboundEndpointsClientGetOptions
- type OutboundEndpointsClientGetResponse
- type OutboundEndpointsClientListOptions
- type OutboundEndpointsClientListResponse
- type OutboundEndpointsClientUpdateResponse
- type Patch
- type Properties
- type ProvisioningState
- type ProxyResource
- type Resource
- type SubResource
- type SubResourceListResult
- type SystemData
- type TargetDNSServer
- type TrackedResource
- type VirtualNetworkDNSForwardingRuleset
- type VirtualNetworkDNSForwardingRulesetListResult
- type VirtualNetworkLink
- type VirtualNetworkLinkListResult
- type VirtualNetworkLinkPatch
- type VirtualNetworkLinkPatchProperties
- type VirtualNetworkLinkProperties
- type VirtualNetworkLinkSubResourceProperties
- type VirtualNetworkLinksClient
- func (client *VirtualNetworkLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (*runtime.Poller[VirtualNetworkLinksClientCreateOrUpdateResponse], error)
- func (client *VirtualNetworkLinksClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (*runtime.Poller[VirtualNetworkLinksClientDeleteResponse], error)
- func (client *VirtualNetworkLinksClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (*runtime.Poller[VirtualNetworkLinksClientUpdateResponse], error)
- func (client *VirtualNetworkLinksClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, ...) (VirtualNetworkLinksClientGetResponse, error)
- func (client *VirtualNetworkLinksClient) NewListPager(resourceGroupName string, dnsForwardingRulesetName string, ...) *runtime.Pager[VirtualNetworkLinksClientListResponse]
- type VirtualNetworkLinksClientBeginCreateOrUpdateOptions
- type VirtualNetworkLinksClientBeginDeleteOptions
- type VirtualNetworkLinksClientBeginUpdateOptions
- type VirtualNetworkLinksClientCreateOrUpdateResponse
- type VirtualNetworkLinksClientDeleteResponse
- type VirtualNetworkLinksClientGetOptions
- type VirtualNetworkLinksClientGetResponse
- type VirtualNetworkLinksClientListOptions
- type VirtualNetworkLinksClientListResponse
- type VirtualNetworkLinksClientUpdateResponse
Examples ¶
- DNSForwardingRulesetsClient.BeginCreateOrUpdate
- DNSForwardingRulesetsClient.BeginDelete
- DNSForwardingRulesetsClient.BeginUpdate
- DNSForwardingRulesetsClient.Get
- DNSForwardingRulesetsClient.NewListByResourceGroupPager
- DNSForwardingRulesetsClient.NewListByVirtualNetworkPager
- DNSForwardingRulesetsClient.NewListPager
- DNSResolversClient.BeginCreateOrUpdate
- DNSResolversClient.BeginDelete
- DNSResolversClient.BeginUpdate
- DNSResolversClient.Get
- DNSResolversClient.NewListByResourceGroupPager
- DNSResolversClient.NewListByVirtualNetworkPager
- DNSResolversClient.NewListPager
- ForwardingRulesClient.CreateOrUpdate
- ForwardingRulesClient.Delete
- ForwardingRulesClient.Get
- ForwardingRulesClient.NewListPager
- ForwardingRulesClient.Update
- InboundEndpointsClient.BeginCreateOrUpdate
- InboundEndpointsClient.BeginDelete
- InboundEndpointsClient.BeginUpdate
- InboundEndpointsClient.Get
- InboundEndpointsClient.NewListPager
- OutboundEndpointsClient.BeginCreateOrUpdate
- OutboundEndpointsClient.BeginDelete
- OutboundEndpointsClient.BeginUpdate
- OutboundEndpointsClient.Get
- OutboundEndpointsClient.NewListPager
- VirtualNetworkLinksClient.BeginCreateOrUpdate
- VirtualNetworkLinksClient.BeginDelete
- VirtualNetworkLinksClient.BeginUpdate
- VirtualNetworkLinksClient.Get
- VirtualNetworkLinksClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudError ¶ added in v0.2.0
type CloudError struct { // The error message body Error *CloudErrorBody `json:"error,omitempty"` }
CloudError - An error message
type CloudErrorBody ¶ added in v0.2.0
type CloudErrorBody struct { // The error code Code *string `json:"code,omitempty"` // Extra error information Details []*CloudErrorBody `json:"details,omitempty"` // A description of what caused the error Message *string `json:"message,omitempty"` // The target resource of the error message Target *string `json:"target,omitempty"` }
CloudErrorBody - The body of an error message
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DNSForwardingRuleset ¶
type DNSForwardingRuleset struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Properties of the DNS forwarding ruleset. Properties *DNSForwardingRulesetProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; ETag of the DNS forwarding ruleset. Etag *string `json:"etag,omitempty" azure:"ro"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
DNSForwardingRuleset - Describes a DNS forwarding ruleset.
func (DNSForwardingRuleset) MarshalJSON ¶
func (d DNSForwardingRuleset) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DNSForwardingRuleset.
type DNSForwardingRulesetListResult ¶
type DNSForwardingRulesetListResult struct { // Enumeration of the DNS forwarding rulesets. Value []*DNSForwardingRuleset `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
DNSForwardingRulesetListResult - The response to an enumeration operation on DNS forwarding rulesets.
type DNSForwardingRulesetPatch ¶
type DNSForwardingRulesetPatch struct { // Tags for DNS Resolver. Tags map[string]*string `json:"tags,omitempty"` }
DNSForwardingRulesetPatch - Describes a DNS forwarding ruleset PATCH operation.
func (DNSForwardingRulesetPatch) MarshalJSON ¶
func (d DNSForwardingRulesetPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DNSForwardingRulesetPatch.
type DNSForwardingRulesetProperties ¶
type DNSForwardingRulesetProperties struct { // The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in // the ruleset to the target DNS servers. DNSResolverOutboundEndpoints []*SubResource `json:"dnsResolverOutboundEndpoints,omitempty"` // READ-ONLY; The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to // set this value will be ignored. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resourceGuid for the DNS forwarding ruleset. ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` }
DNSForwardingRulesetProperties - Represents the properties of a DNS forwarding ruleset.
func (DNSForwardingRulesetProperties) MarshalJSON ¶
func (d DNSForwardingRulesetProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DNSForwardingRulesetProperties.
type DNSForwardingRulesetsClient ¶
type DNSForwardingRulesetsClient struct {
// contains filtered or unexported fields
}
DNSForwardingRulesetsClient contains the methods for the DNSForwardingRulesets group. Don't use this type directly, use NewDNSForwardingRulesetsClient() instead.
func NewDNSForwardingRulesetsClient ¶
func NewDNSForwardingRulesetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DNSForwardingRulesetsClient, error)
NewDNSForwardingRulesetsClient creates a new instance of DNSForwardingRulesetsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*DNSForwardingRulesetsClient) BeginCreateOrUpdate ¶
func (client *DNSForwardingRulesetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, parameters DNSForwardingRuleset, options *DNSForwardingRulesetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DNSForwardingRulesetsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. parameters - Parameters supplied to the CreateOrUpdate operation. options - DNSForwardingRulesetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsForwardingRuleset_Put.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSForwardingRulesetsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "sampleResourceGroup", "samplednsForwardingRuleset", armdnsresolver.DNSForwardingRuleset{ Location: to.Ptr("westus2"), Tags: map[string]*string{ "key1": to.Ptr("value1"), }, Properties: &armdnsresolver.DNSForwardingRulesetProperties{ DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{ { ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"), }, { ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"), }}, }, }, &armdnsresolver.DNSForwardingRulesetsClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*DNSForwardingRulesetsClient) BeginDelete ¶
func (client *DNSForwardingRulesetsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, options *DNSForwardingRulesetsClientBeginDeleteOptions) (*runtime.Poller[DNSForwardingRulesetsClientDeleteResponse], error)
BeginDelete - Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the ruleset will be deleted. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. options - DNSForwardingRulesetsClientBeginDeleteOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsForwardingRuleset_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSForwardingRulesetsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "sampleResourceGroup", "samplednsForwardingRulesetName", &armdnsresolver.DNSForwardingRulesetsClientBeginDeleteOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DNSForwardingRulesetsClient) BeginUpdate ¶
func (client *DNSForwardingRulesetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, parameters DNSForwardingRulesetPatch, options *DNSForwardingRulesetsClientBeginUpdateOptions) (*runtime.Poller[DNSForwardingRulesetsClientUpdateResponse], error)
BeginUpdate - Updates a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. parameters - Parameters supplied to the Update operation. options - DNSForwardingRulesetsClientBeginUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsForwardingRuleset_Patch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSForwardingRulesetsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", armdnsresolver.DNSForwardingRulesetPatch{ Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }, &armdnsresolver.DNSForwardingRulesetsClientBeginUpdateOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*DNSForwardingRulesetsClient) Get ¶
func (client *DNSForwardingRulesetsClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, options *DNSForwardingRulesetsClientGetOptions) (DNSForwardingRulesetsClientGetResponse, error)
Get - Gets a DNS forwarding ruleset properties. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. options - DNSForwardingRulesetsClientGetOptions contains the optional parameters for the DNSForwardingRulesetsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsForwardingRuleset_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSForwardingRulesetsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*DNSForwardingRulesetsClient) NewListByResourceGroupPager ¶ added in v0.3.0
func (client *DNSForwardingRulesetsClient) NewListByResourceGroupPager(resourceGroupName string, options *DNSForwardingRulesetsClientListByResourceGroupOptions) *runtime.Pager[DNSForwardingRulesetsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists DNS forwarding rulesets within a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - DNSForwardingRulesetsClientListByResourceGroupOptions contains the optional parameters for the DNSForwardingRulesetsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsForwardingRuleset_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSForwardingRulesetsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("sampleResourceGroup", &armdnsresolver.DNSForwardingRulesetsClientListByResourceGroupOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DNSForwardingRulesetsClient) NewListByVirtualNetworkPager ¶ added in v0.3.0
func (client *DNSForwardingRulesetsClient) NewListByVirtualNetworkPager(resourceGroupName string, virtualNetworkName string, options *DNSForwardingRulesetsClientListByVirtualNetworkOptions) *runtime.Pager[DNSForwardingRulesetsClientListByVirtualNetworkResponse]
NewListByVirtualNetworkPager - Lists DNS forwarding ruleset resource IDs attached to a virtual network. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. virtualNetworkName - The name of the virtual network. options - DNSForwardingRulesetsClientListByVirtualNetworkOptions contains the optional parameters for the DNSForwardingRulesetsClient.ListByVirtualNetwork method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsForwardingRuleset_ListByVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSForwardingRulesetsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByVirtualNetworkPager("sampleResourceGroup", "sampleVirtualNetwork", &armdnsresolver.DNSForwardingRulesetsClientListByVirtualNetworkOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DNSForwardingRulesetsClient) NewListPager ¶ added in v0.3.0
func (client *DNSForwardingRulesetsClient) NewListPager(options *DNSForwardingRulesetsClientListOptions) *runtime.Pager[DNSForwardingRulesetsClientListResponse]
NewListPager - Lists DNS forwarding rulesets in all resource groups of a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview options - DNSForwardingRulesetsClientListOptions contains the optional parameters for the DNSForwardingRulesetsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsForwardingRuleset_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSForwardingRulesetsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(&armdnsresolver.DNSForwardingRulesetsClientListOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DNSForwardingRulesetsClientBeginCreateOrUpdateOptions ¶
type DNSForwardingRulesetsClientBeginCreateOrUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
DNSForwardingRulesetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginCreateOrUpdate method.
type DNSForwardingRulesetsClientBeginDeleteOptions ¶
type DNSForwardingRulesetsClientBeginDeleteOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
DNSForwardingRulesetsClientBeginDeleteOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginDelete method.
type DNSForwardingRulesetsClientBeginUpdateOptions ¶
type DNSForwardingRulesetsClientBeginUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
DNSForwardingRulesetsClientBeginUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginUpdate method.
type DNSForwardingRulesetsClientCreateOrUpdateResponse ¶
type DNSForwardingRulesetsClientCreateOrUpdateResponse struct {
DNSForwardingRuleset
}
DNSForwardingRulesetsClientCreateOrUpdateResponse contains the response from method DNSForwardingRulesetsClient.CreateOrUpdate.
type DNSForwardingRulesetsClientDeleteResponse ¶
type DNSForwardingRulesetsClientDeleteResponse struct { }
DNSForwardingRulesetsClientDeleteResponse contains the response from method DNSForwardingRulesetsClient.Delete.
type DNSForwardingRulesetsClientGetOptions ¶
type DNSForwardingRulesetsClientGetOptions struct { }
DNSForwardingRulesetsClientGetOptions contains the optional parameters for the DNSForwardingRulesetsClient.Get method.
type DNSForwardingRulesetsClientGetResponse ¶
type DNSForwardingRulesetsClientGetResponse struct {
DNSForwardingRuleset
}
DNSForwardingRulesetsClientGetResponse contains the response from method DNSForwardingRulesetsClient.Get.
type DNSForwardingRulesetsClientListByResourceGroupOptions ¶
type DNSForwardingRulesetsClientListByResourceGroupOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
DNSForwardingRulesetsClientListByResourceGroupOptions contains the optional parameters for the DNSForwardingRulesetsClient.ListByResourceGroup method.
type DNSForwardingRulesetsClientListByResourceGroupResponse ¶
type DNSForwardingRulesetsClientListByResourceGroupResponse struct {
DNSForwardingRulesetListResult
}
DNSForwardingRulesetsClientListByResourceGroupResponse contains the response from method DNSForwardingRulesetsClient.ListByResourceGroup.
type DNSForwardingRulesetsClientListByVirtualNetworkOptions ¶
type DNSForwardingRulesetsClientListByVirtualNetworkOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
DNSForwardingRulesetsClientListByVirtualNetworkOptions contains the optional parameters for the DNSForwardingRulesetsClient.ListByVirtualNetwork method.
type DNSForwardingRulesetsClientListByVirtualNetworkResponse ¶
type DNSForwardingRulesetsClientListByVirtualNetworkResponse struct {
VirtualNetworkDNSForwardingRulesetListResult
}
DNSForwardingRulesetsClientListByVirtualNetworkResponse contains the response from method DNSForwardingRulesetsClient.ListByVirtualNetwork.
type DNSForwardingRulesetsClientListOptions ¶
type DNSForwardingRulesetsClientListOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
DNSForwardingRulesetsClientListOptions contains the optional parameters for the DNSForwardingRulesetsClient.List method.
type DNSForwardingRulesetsClientListResponse ¶
type DNSForwardingRulesetsClientListResponse struct {
DNSForwardingRulesetListResult
}
DNSForwardingRulesetsClientListResponse contains the response from method DNSForwardingRulesetsClient.List.
type DNSForwardingRulesetsClientUpdateResponse ¶
type DNSForwardingRulesetsClientUpdateResponse struct {
DNSForwardingRuleset
}
DNSForwardingRulesetsClientUpdateResponse contains the response from method DNSForwardingRulesetsClient.Update.
type DNSResolver ¶
type DNSResolver struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Properties of the DNS resolver. Properties *Properties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; ETag of the DNS resolver. Etag *string `json:"etag,omitempty" azure:"ro"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
DNSResolver - Describes a DNS resolver.
func (DNSResolver) MarshalJSON ¶
func (d DNSResolver) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type DNSResolver.
type DNSResolverState ¶
type DNSResolverState string
DNSResolverState - The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored.
const ( DNSResolverStateConnected DNSResolverState = "Connected" DNSResolverStateDisconnected DNSResolverState = "Disconnected" )
func PossibleDNSResolverStateValues ¶
func PossibleDNSResolverStateValues() []DNSResolverState
PossibleDNSResolverStateValues returns the possible values for the DNSResolverState const type.
type DNSResolversClient ¶
type DNSResolversClient struct {
// contains filtered or unexported fields
}
DNSResolversClient contains the methods for the DNSResolvers group. Don't use this type directly, use NewDNSResolversClient() instead.
func NewDNSResolversClient ¶
func NewDNSResolversClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DNSResolversClient, error)
NewDNSResolversClient creates a new instance of DNSResolversClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*DNSResolversClient) BeginCreateOrUpdate ¶
func (client *DNSResolversClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, parameters DNSResolver, options *DNSResolversClientBeginCreateOrUpdateOptions) (*runtime.Poller[DNSResolversClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. parameters - Parameters supplied to the CreateOrUpdate operation. options - DNSResolversClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSResolversClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsResolver_Put.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSResolversClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", armdnsresolver.DNSResolver{ Location: to.Ptr("westus2"), Tags: map[string]*string{ "key1": to.Ptr("value1"), }, Properties: &armdnsresolver.Properties{ VirtualNetwork: &armdnsresolver.SubResource{ ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), }, }, }, &armdnsresolver.DNSResolversClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*DNSResolversClient) BeginDelete ¶
func (client *DNSResolversClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, options *DNSResolversClientBeginDeleteOptions) (*runtime.Poller[DNSResolversClientDeleteResponse], error)
BeginDelete - Deletes a DNS resolver. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. options - DNSResolversClientBeginDeleteOptions contains the optional parameters for the DNSResolversClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsResolver_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSResolversClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolver", &armdnsresolver.DNSResolversClientBeginDeleteOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*DNSResolversClient) BeginUpdate ¶
func (client *DNSResolversClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, parameters Patch, options *DNSResolversClientBeginUpdateOptions) (*runtime.Poller[DNSResolversClientUpdateResponse], error)
BeginUpdate - Updates a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. parameters - Parameters supplied to the Update operation. options - DNSResolversClientBeginUpdateOptions contains the optional parameters for the DNSResolversClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsResolver_Patch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSResolversClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", armdnsresolver.Patch{ Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }, &armdnsresolver.DNSResolversClientBeginUpdateOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*DNSResolversClient) Get ¶
func (client *DNSResolversClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, options *DNSResolversClientGetOptions) (DNSResolversClientGetResponse, error)
Get - Gets properties of a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. options - DNSResolversClientGetOptions contains the optional parameters for the DNSResolversClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsResolver_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSResolversClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "sampleResourceGroup", "sampleDnsResolver", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*DNSResolversClient) NewListByResourceGroupPager ¶ added in v0.3.0
func (client *DNSResolversClient) NewListByResourceGroupPager(resourceGroupName string, options *DNSResolversClientListByResourceGroupOptions) *runtime.Pager[DNSResolversClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists DNS resolvers within a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. options - DNSResolversClientListByResourceGroupOptions contains the optional parameters for the DNSResolversClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsResolver_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSResolversClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("sampleResourceGroup", &armdnsresolver.DNSResolversClientListByResourceGroupOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DNSResolversClient) NewListByVirtualNetworkPager ¶ added in v0.3.0
func (client *DNSResolversClient) NewListByVirtualNetworkPager(resourceGroupName string, virtualNetworkName string, options *DNSResolversClientListByVirtualNetworkOptions) *runtime.Pager[DNSResolversClientListByVirtualNetworkResponse]
NewListByVirtualNetworkPager - Lists DNS resolver resource IDs linked to a virtual network. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. virtualNetworkName - The name of the virtual network. options - DNSResolversClientListByVirtualNetworkOptions contains the optional parameters for the DNSResolversClient.ListByVirtualNetwork method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsResolver_ListByVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSResolversClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByVirtualNetworkPager("sampleResourceGroup", "sampleVirtualNetwork", &armdnsresolver.DNSResolversClientListByVirtualNetworkOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*DNSResolversClient) NewListPager ¶ added in v0.3.0
func (client *DNSResolversClient) NewListPager(options *DNSResolversClientListOptions) *runtime.Pager[DNSResolversClientListResponse]
NewListPager - Lists DNS resolvers in all resource groups of a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview options - DNSResolversClientListOptions contains the optional parameters for the DNSResolversClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/DnsResolver_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewDNSResolversClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(&armdnsresolver.DNSResolversClientListOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type DNSResolversClientBeginCreateOrUpdateOptions ¶
type DNSResolversClientBeginCreateOrUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
DNSResolversClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSResolversClient.BeginCreateOrUpdate method.
type DNSResolversClientBeginDeleteOptions ¶
type DNSResolversClientBeginDeleteOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
DNSResolversClientBeginDeleteOptions contains the optional parameters for the DNSResolversClient.BeginDelete method.
type DNSResolversClientBeginUpdateOptions ¶
type DNSResolversClientBeginUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
DNSResolversClientBeginUpdateOptions contains the optional parameters for the DNSResolversClient.BeginUpdate method.
type DNSResolversClientCreateOrUpdateResponse ¶
type DNSResolversClientCreateOrUpdateResponse struct {
DNSResolver
}
DNSResolversClientCreateOrUpdateResponse contains the response from method DNSResolversClient.CreateOrUpdate.
type DNSResolversClientDeleteResponse ¶
type DNSResolversClientDeleteResponse struct { }
DNSResolversClientDeleteResponse contains the response from method DNSResolversClient.Delete.
type DNSResolversClientGetOptions ¶
type DNSResolversClientGetOptions struct { }
DNSResolversClientGetOptions contains the optional parameters for the DNSResolversClient.Get method.
type DNSResolversClientGetResponse ¶
type DNSResolversClientGetResponse struct {
DNSResolver
}
DNSResolversClientGetResponse contains the response from method DNSResolversClient.Get.
type DNSResolversClientListByResourceGroupOptions ¶
type DNSResolversClientListByResourceGroupOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
DNSResolversClientListByResourceGroupOptions contains the optional parameters for the DNSResolversClient.ListByResourceGroup method.
type DNSResolversClientListByResourceGroupResponse ¶
type DNSResolversClientListByResourceGroupResponse struct {
ListResult
}
DNSResolversClientListByResourceGroupResponse contains the response from method DNSResolversClient.ListByResourceGroup.
type DNSResolversClientListByVirtualNetworkOptions ¶
type DNSResolversClientListByVirtualNetworkOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
DNSResolversClientListByVirtualNetworkOptions contains the optional parameters for the DNSResolversClient.ListByVirtualNetwork method.
type DNSResolversClientListByVirtualNetworkResponse ¶
type DNSResolversClientListByVirtualNetworkResponse struct {
SubResourceListResult
}
DNSResolversClientListByVirtualNetworkResponse contains the response from method DNSResolversClient.ListByVirtualNetwork.
type DNSResolversClientListOptions ¶
type DNSResolversClientListOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
DNSResolversClientListOptions contains the optional parameters for the DNSResolversClient.List method.
type DNSResolversClientListResponse ¶
type DNSResolversClientListResponse struct {
ListResult
}
DNSResolversClientListResponse contains the response from method DNSResolversClient.List.
type DNSResolversClientUpdateResponse ¶
type DNSResolversClientUpdateResponse struct {
DNSResolver
}
DNSResolversClientUpdateResponse contains the response from method DNSResolversClient.Update.
type ForwardingRule ¶
type ForwardingRule struct { // Properties of the forwarding rule. Properties *ForwardingRuleProperties `json:"properties,omitempty"` // READ-ONLY; ETag of the forwarding rule. Etag *string `json:"etag,omitempty" azure:"ro"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ForwardingRule - Describes a forwarding rule within a DNS forwarding ruleset.
type ForwardingRuleListResult ¶
type ForwardingRuleListResult struct { // Enumeration of the forwarding rules. Value []*ForwardingRule `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
ForwardingRuleListResult - The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset.
type ForwardingRulePatch ¶
type ForwardingRulePatch struct { // Updatable properties of the forwarding rule. Properties *ForwardingRulePatchProperties `json:"properties,omitempty"` }
ForwardingRulePatch - Describes a forwarding rule for PATCH operation.
func (ForwardingRulePatch) MarshalJSON ¶
func (f ForwardingRulePatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ForwardingRulePatch.
type ForwardingRulePatchProperties ¶
type ForwardingRulePatchProperties struct { // The state of forwarding rule. ForwardingRuleState *ForwardingRuleState `json:"forwardingRuleState,omitempty"` // Metadata attached to the forwarding rule. Metadata map[string]*string `json:"metadata,omitempty"` // DNS servers to forward the DNS query to. TargetDNSServers []*TargetDNSServer `json:"targetDnsServers,omitempty"` }
ForwardingRulePatchProperties - Represents the updatable properties of a forwarding rule within a DNS forwarding ruleset.
func (ForwardingRulePatchProperties) MarshalJSON ¶
func (f ForwardingRulePatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ForwardingRulePatchProperties.
type ForwardingRuleProperties ¶
type ForwardingRuleProperties struct { // REQUIRED; The domain name for the forwarding rule. DomainName *string `json:"domainName,omitempty"` // REQUIRED; DNS servers to forward the DNS query to. TargetDNSServers []*TargetDNSServer `json:"targetDnsServers,omitempty"` // The state of forwarding rule. ForwardingRuleState *ForwardingRuleState `json:"forwardingRuleState,omitempty"` // Metadata attached to the forwarding rule. Metadata map[string]*string `json:"metadata,omitempty"` // READ-ONLY; The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this // value will be ignored. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
ForwardingRuleProperties - Represents the properties of a forwarding rule within a DNS forwarding ruleset.
func (ForwardingRuleProperties) MarshalJSON ¶
func (f ForwardingRuleProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ForwardingRuleProperties.
type ForwardingRuleState ¶
type ForwardingRuleState string
ForwardingRuleState - The state of forwarding rule.
const ( ForwardingRuleStateDisabled ForwardingRuleState = "Disabled" ForwardingRuleStateEnabled ForwardingRuleState = "Enabled" )
func PossibleForwardingRuleStateValues ¶
func PossibleForwardingRuleStateValues() []ForwardingRuleState
PossibleForwardingRuleStateValues returns the possible values for the ForwardingRuleState const type.
type ForwardingRulesClient ¶
type ForwardingRulesClient struct {
// contains filtered or unexported fields
}
ForwardingRulesClient contains the methods for the ForwardingRules group. Don't use this type directly, use NewForwardingRulesClient() instead.
func NewForwardingRulesClient ¶
func NewForwardingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ForwardingRulesClient, error)
NewForwardingRulesClient creates a new instance of ForwardingRulesClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ForwardingRulesClient) CreateOrUpdate ¶
func (client *ForwardingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, parameters ForwardingRule, options *ForwardingRulesClientCreateOrUpdateOptions) (ForwardingRulesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a forwarding rule in a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. forwardingRuleName - The name of the forwarding rule. parameters - Parameters supplied to the CreateOrUpdate operation. options - ForwardingRulesClientCreateOrUpdateOptions contains the optional parameters for the ForwardingRulesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/ForwardingRule_Put.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewForwardingRulesClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", armdnsresolver.ForwardingRule{ Properties: &armdnsresolver.ForwardingRuleProperties{ DomainName: to.Ptr("contoso.com."), ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateEnabled), Metadata: map[string]*string{ "additionalProp1": to.Ptr("value1"), }, TargetDNSServers: []*armdnsresolver.TargetDNSServer{ { IPAddress: to.Ptr("10.0.0.1"), Port: to.Ptr[int32](53), }, { IPAddress: to.Ptr("10.0.0.2"), Port: to.Ptr[int32](53), }}, }, }, &armdnsresolver.ForwardingRulesClientCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ForwardingRulesClient) Delete ¶
func (client *ForwardingRulesClient) Delete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, options *ForwardingRulesClientDeleteOptions) (ForwardingRulesClientDeleteResponse, error)
Delete - Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. forwardingRuleName - The name of the forwarding rule. options - ForwardingRulesClientDeleteOptions contains the optional parameters for the ForwardingRulesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/ForwardingRule_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewForwardingRulesClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", &armdnsresolver.ForwardingRulesClientDeleteOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ForwardingRulesClient) Get ¶
func (client *ForwardingRulesClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, options *ForwardingRulesClientGetOptions) (ForwardingRulesClientGetResponse, error)
Get - Gets properties of a forwarding rule in a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. forwardingRuleName - The name of the forwarding rule. options - ForwardingRulesClientGetOptions contains the optional parameters for the ForwardingRulesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/ForwardingRule_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewForwardingRulesClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ForwardingRulesClient) NewListPager ¶ added in v0.3.0
func (client *ForwardingRulesClient) NewListPager(resourceGroupName string, dnsForwardingRulesetName string, options *ForwardingRulesClientListOptions) *runtime.Pager[ForwardingRulesClientListResponse]
NewListPager - Lists forwarding rules in a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. options - ForwardingRulesClientListOptions contains the optional parameters for the ForwardingRulesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/ForwardingRule_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewForwardingRulesClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("sampleResourceGroup", "sampleDnsForwardingRuleset", &armdnsresolver.ForwardingRulesClientListOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*ForwardingRulesClient) Update ¶
func (client *ForwardingRulesClient) Update(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, parameters ForwardingRulePatch, options *ForwardingRulesClientUpdateOptions) (ForwardingRulesClientUpdateResponse, error)
Update - Updates a forwarding rule in a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. forwardingRuleName - The name of the forwarding rule. parameters - Parameters supplied to the Update operation. options - ForwardingRulesClientUpdateOptions contains the optional parameters for the ForwardingRulesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/ForwardingRule_Patch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewForwardingRulesClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", armdnsresolver.ForwardingRulePatch{ Properties: &armdnsresolver.ForwardingRulePatchProperties{ ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateDisabled), Metadata: map[string]*string{ "additionalProp2": to.Ptr("value2"), }, }, }, &armdnsresolver.ForwardingRulesClientUpdateOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ForwardingRulesClientCreateOrUpdateOptions ¶
type ForwardingRulesClientCreateOrUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. IfNoneMatch *string }
ForwardingRulesClientCreateOrUpdateOptions contains the optional parameters for the ForwardingRulesClient.CreateOrUpdate method.
type ForwardingRulesClientCreateOrUpdateResponse ¶
type ForwardingRulesClientCreateOrUpdateResponse struct {
ForwardingRule
}
ForwardingRulesClientCreateOrUpdateResponse contains the response from method ForwardingRulesClient.CreateOrUpdate.
type ForwardingRulesClientDeleteOptions ¶
type ForwardingRulesClientDeleteOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string }
ForwardingRulesClientDeleteOptions contains the optional parameters for the ForwardingRulesClient.Delete method.
type ForwardingRulesClientDeleteResponse ¶
type ForwardingRulesClientDeleteResponse struct { }
ForwardingRulesClientDeleteResponse contains the response from method ForwardingRulesClient.Delete.
type ForwardingRulesClientGetOptions ¶
type ForwardingRulesClientGetOptions struct { }
ForwardingRulesClientGetOptions contains the optional parameters for the ForwardingRulesClient.Get method.
type ForwardingRulesClientGetResponse ¶
type ForwardingRulesClientGetResponse struct {
ForwardingRule
}
ForwardingRulesClientGetResponse contains the response from method ForwardingRulesClient.Get.
type ForwardingRulesClientListOptions ¶
type ForwardingRulesClientListOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
ForwardingRulesClientListOptions contains the optional parameters for the ForwardingRulesClient.List method.
type ForwardingRulesClientListResponse ¶
type ForwardingRulesClientListResponse struct {
ForwardingRuleListResult
}
ForwardingRulesClientListResponse contains the response from method ForwardingRulesClient.List.
type ForwardingRulesClientUpdateOptions ¶
type ForwardingRulesClientUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string }
ForwardingRulesClientUpdateOptions contains the optional parameters for the ForwardingRulesClient.Update method.
type ForwardingRulesClientUpdateResponse ¶
type ForwardingRulesClientUpdateResponse struct {
ForwardingRule
}
ForwardingRulesClientUpdateResponse contains the response from method ForwardingRulesClient.Update.
type IPAllocationMethod ¶
type IPAllocationMethod string
IPAllocationMethod - Private IP address allocation method.
const ( IPAllocationMethodDynamic IPAllocationMethod = "Dynamic" IPAllocationMethodStatic IPAllocationMethod = "Static" )
func PossibleIPAllocationMethodValues ¶
func PossibleIPAllocationMethodValues() []IPAllocationMethod
PossibleIPAllocationMethodValues returns the possible values for the IPAllocationMethod const type.
type IPConfiguration ¶
type IPConfiguration struct { // Private IP address of the IP configuration. PrivateIPAddress *string `json:"privateIpAddress,omitempty"` // Private IP address allocation method. PrivateIPAllocationMethod *IPAllocationMethod `json:"privateIpAllocationMethod,omitempty"` // The reference to the subnet bound to the IP configuration. Subnet *SubResource `json:"subnet,omitempty"` }
IPConfiguration - IP configuration.
type InboundEndpoint ¶
type InboundEndpoint struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Properties of the inbound endpoint. Properties *InboundEndpointProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; ETag of the inbound endpoint. Etag *string `json:"etag,omitempty" azure:"ro"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
InboundEndpoint - Describes an inbound endpoint for a DNS resolver.
func (InboundEndpoint) MarshalJSON ¶
func (i InboundEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InboundEndpoint.
type InboundEndpointListResult ¶
type InboundEndpointListResult struct { // Enumeration of the inbound endpoints for a DNS resolver. Value []*InboundEndpoint `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
InboundEndpointListResult - The response to an enumeration operation on inbound endpoints for a DNS resolver.
type InboundEndpointPatch ¶
type InboundEndpointPatch struct { // Tags for inbound endpoint. Tags map[string]*string `json:"tags,omitempty"` }
InboundEndpointPatch - Describes an inbound endpoint for a DNS resolver for PATCH operation.
func (InboundEndpointPatch) MarshalJSON ¶
func (i InboundEndpointPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InboundEndpointPatch.
type InboundEndpointProperties ¶
type InboundEndpointProperties struct { // IP configurations for the inbound endpoint. IPConfigurations []*IPConfiguration `json:"ipConfigurations,omitempty"` // READ-ONLY; The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set // this value will be ignored. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resourceGuid property of the inbound endpoint resource. ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` }
InboundEndpointProperties - Represents the properties of an inbound endpoint for a DNS resolver.
func (InboundEndpointProperties) MarshalJSON ¶
func (i InboundEndpointProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InboundEndpointProperties.
type InboundEndpointsClient ¶
type InboundEndpointsClient struct {
// contains filtered or unexported fields
}
InboundEndpointsClient contains the methods for the InboundEndpoints group. Don't use this type directly, use NewInboundEndpointsClient() instead.
func NewInboundEndpointsClient ¶
func NewInboundEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundEndpointsClient, error)
NewInboundEndpointsClient creates a new instance of InboundEndpointsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*InboundEndpointsClient) BeginCreateOrUpdate ¶
func (client *InboundEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, parameters InboundEndpoint, options *InboundEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundEndpointsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an inbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. inboundEndpointName - The name of the inbound endpoint for the DNS resolver. parameters - Parameters supplied to the CreateOrUpdate operation. options - InboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/InboundEndpoint_Put.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewInboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", armdnsresolver.InboundEndpoint{ Location: to.Ptr("westus2"), Tags: map[string]*string{ "key1": to.Ptr("value1"), }, Properties: &armdnsresolver.InboundEndpointProperties{ IPConfigurations: []*armdnsresolver.IPConfiguration{ { PrivateIPAddress: to.Ptr("255.255.255.255"), PrivateIPAllocationMethod: to.Ptr(armdnsresolver.IPAllocationMethodStatic), Subnet: &armdnsresolver.SubResource{ ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"), }, }}, }, }, &armdnsresolver.InboundEndpointsClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*InboundEndpointsClient) BeginDelete ¶
func (client *InboundEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, options *InboundEndpointsClientBeginDeleteOptions) (*runtime.Poller[InboundEndpointsClientDeleteResponse], error)
BeginDelete - Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. inboundEndpointName - The name of the inbound endpoint for the DNS resolver. options - InboundEndpointsClientBeginDeleteOptions contains the optional parameters for the InboundEndpointsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/InboundEndpoint_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewInboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", &armdnsresolver.InboundEndpointsClientBeginDeleteOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*InboundEndpointsClient) BeginUpdate ¶
func (client *InboundEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, parameters InboundEndpointPatch, options *InboundEndpointsClientBeginUpdateOptions) (*runtime.Poller[InboundEndpointsClientUpdateResponse], error)
BeginUpdate - Updates an inbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. inboundEndpointName - The name of the inbound endpoint for the DNS resolver. parameters - Parameters supplied to the Update operation. options - InboundEndpointsClientBeginUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/InboundEndpoint_Patch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewInboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", armdnsresolver.InboundEndpointPatch{ Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }, &armdnsresolver.InboundEndpointsClientBeginUpdateOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*InboundEndpointsClient) Get ¶
func (client *InboundEndpointsClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, options *InboundEndpointsClientGetOptions) (InboundEndpointsClientGetResponse, error)
Get - Gets properties of an inbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. inboundEndpointName - The name of the inbound endpoint for the DNS resolver. options - InboundEndpointsClientGetOptions contains the optional parameters for the InboundEndpointsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/InboundEndpoint_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewInboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InboundEndpointsClient) NewListPager ¶ added in v0.3.0
func (client *InboundEndpointsClient) NewListPager(resourceGroupName string, dnsResolverName string, options *InboundEndpointsClientListOptions) *runtime.Pager[InboundEndpointsClientListResponse]
NewListPager - Lists inbound endpoints for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. options - InboundEndpointsClientListOptions contains the optional parameters for the InboundEndpointsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/InboundEndpoint_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewInboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("sampleResourceGroup", "sampleDnsResolver", &armdnsresolver.InboundEndpointsClientListOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type InboundEndpointsClientBeginCreateOrUpdateOptions ¶
type InboundEndpointsClientBeginCreateOrUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
InboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginCreateOrUpdate method.
type InboundEndpointsClientBeginDeleteOptions ¶
type InboundEndpointsClientBeginDeleteOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
InboundEndpointsClientBeginDeleteOptions contains the optional parameters for the InboundEndpointsClient.BeginDelete method.
type InboundEndpointsClientBeginUpdateOptions ¶
type InboundEndpointsClientBeginUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
InboundEndpointsClientBeginUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginUpdate method.
type InboundEndpointsClientCreateOrUpdateResponse ¶
type InboundEndpointsClientCreateOrUpdateResponse struct {
InboundEndpoint
}
InboundEndpointsClientCreateOrUpdateResponse contains the response from method InboundEndpointsClient.CreateOrUpdate.
type InboundEndpointsClientDeleteResponse ¶
type InboundEndpointsClientDeleteResponse struct { }
InboundEndpointsClientDeleteResponse contains the response from method InboundEndpointsClient.Delete.
type InboundEndpointsClientGetOptions ¶
type InboundEndpointsClientGetOptions struct { }
InboundEndpointsClientGetOptions contains the optional parameters for the InboundEndpointsClient.Get method.
type InboundEndpointsClientGetResponse ¶
type InboundEndpointsClientGetResponse struct {
InboundEndpoint
}
InboundEndpointsClientGetResponse contains the response from method InboundEndpointsClient.Get.
type InboundEndpointsClientListOptions ¶
type InboundEndpointsClientListOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
InboundEndpointsClientListOptions contains the optional parameters for the InboundEndpointsClient.List method.
type InboundEndpointsClientListResponse ¶
type InboundEndpointsClientListResponse struct {
InboundEndpointListResult
}
InboundEndpointsClientListResponse contains the response from method InboundEndpointsClient.List.
type InboundEndpointsClientUpdateResponse ¶
type InboundEndpointsClientUpdateResponse struct {
InboundEndpoint
}
InboundEndpointsClientUpdateResponse contains the response from method InboundEndpointsClient.Update.
type ListResult ¶
type ListResult struct { // Enumeration of the DNS resolvers. Value []*DNSResolver `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
ListResult - The response to an enumeration operation on DNS resolvers.
type OutboundEndpoint ¶
type OutboundEndpoint struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Properties of the outbound endpoint. Properties *OutboundEndpointProperties `json:"properties,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; ETag of the outbound endpoint. Etag *string `json:"etag,omitempty" azure:"ro"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
OutboundEndpoint - Describes an outbound endpoint for a DNS resolver.
func (OutboundEndpoint) MarshalJSON ¶
func (o OutboundEndpoint) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundEndpoint.
type OutboundEndpointListResult ¶
type OutboundEndpointListResult struct { // Enumeration of the outbound endpoints for a DNS resolver. Value []*OutboundEndpoint `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
OutboundEndpointListResult - The response to an enumeration operation on outbound endpoints for a DNS resolver.
type OutboundEndpointPatch ¶
type OutboundEndpointPatch struct { // Tags for outbound endpoint. Tags map[string]*string `json:"tags,omitempty"` }
OutboundEndpointPatch - Describes an outbound endpoint for a DNS resolver for PATCH operation.
func (OutboundEndpointPatch) MarshalJSON ¶
func (o OutboundEndpointPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OutboundEndpointPatch.
type OutboundEndpointProperties ¶
type OutboundEndpointProperties struct { // The reference to the subnet used for the outbound endpoint. Subnet *SubResource `json:"subnet,omitempty"` // READ-ONLY; The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set // this value will be ignored. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resourceGuid property of the outbound endpoint resource. ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` }
OutboundEndpointProperties - Represents the properties of an outbound endpoint for a DNS resolver.
type OutboundEndpointsClient ¶
type OutboundEndpointsClient struct {
// contains filtered or unexported fields
}
OutboundEndpointsClient contains the methods for the OutboundEndpoints group. Don't use this type directly, use NewOutboundEndpointsClient() instead.
func NewOutboundEndpointsClient ¶
func NewOutboundEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OutboundEndpointsClient, error)
NewOutboundEndpointsClient creates a new instance of OutboundEndpointsClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OutboundEndpointsClient) BeginCreateOrUpdate ¶
func (client *OutboundEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, parameters OutboundEndpoint, options *OutboundEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[OutboundEndpointsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates an outbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. outboundEndpointName - The name of the outbound endpoint for the DNS resolver. parameters - Parameters supplied to the CreateOrUpdate operation. options - OutboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/OutboundEndpoint_Put.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewOutboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", armdnsresolver.OutboundEndpoint{ Location: to.Ptr("westus2"), Tags: map[string]*string{ "key1": to.Ptr("value1"), }, Properties: &armdnsresolver.OutboundEndpointProperties{ Subnet: &armdnsresolver.SubResource{ ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"), }, }, }, &armdnsresolver.OutboundEndpointsClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*OutboundEndpointsClient) BeginDelete ¶
func (client *OutboundEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, options *OutboundEndpointsClientBeginDeleteOptions) (*runtime.Poller[OutboundEndpointsClientDeleteResponse], error)
BeginDelete - Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. outboundEndpointName - The name of the outbound endpoint for the DNS resolver. options - OutboundEndpointsClientBeginDeleteOptions contains the optional parameters for the OutboundEndpointsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/OutboundEndpoint_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewOutboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", &armdnsresolver.OutboundEndpointsClientBeginDeleteOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*OutboundEndpointsClient) BeginUpdate ¶
func (client *OutboundEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, parameters OutboundEndpointPatch, options *OutboundEndpointsClientBeginUpdateOptions) (*runtime.Poller[OutboundEndpointsClientUpdateResponse], error)
BeginUpdate - Updates an outbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. outboundEndpointName - The name of the outbound endpoint for the DNS resolver. parameters - Parameters supplied to the Update operation. options - OutboundEndpointsClientBeginUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/OutboundEndpoint_Patch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewOutboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", armdnsresolver.OutboundEndpointPatch{ Tags: map[string]*string{ "key1": to.Ptr("value1"), }, }, &armdnsresolver.OutboundEndpointsClientBeginUpdateOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*OutboundEndpointsClient) Get ¶
func (client *OutboundEndpointsClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, options *OutboundEndpointsClientGetOptions) (OutboundEndpointsClientGetResponse, error)
Get - Gets properties of an outbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. outboundEndpointName - The name of the outbound endpoint for the DNS resolver. options - OutboundEndpointsClientGetOptions contains the optional parameters for the OutboundEndpointsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/OutboundEndpoint_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewOutboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*OutboundEndpointsClient) NewListPager ¶ added in v0.3.0
func (client *OutboundEndpointsClient) NewListPager(resourceGroupName string, dnsResolverName string, options *OutboundEndpointsClientListOptions) *runtime.Pager[OutboundEndpointsClientListResponse]
NewListPager - Lists outbound endpoints for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsResolverName - The name of the DNS resolver. options - OutboundEndpointsClientListOptions contains the optional parameters for the OutboundEndpointsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/OutboundEndpoint_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewOutboundEndpointsClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("sampleResourceGroup", "sampleDnsResolver", &armdnsresolver.OutboundEndpointsClientListOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OutboundEndpointsClientBeginCreateOrUpdateOptions ¶
type OutboundEndpointsClientBeginCreateOrUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
OutboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginCreateOrUpdate method.
type OutboundEndpointsClientBeginDeleteOptions ¶
type OutboundEndpointsClientBeginDeleteOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
OutboundEndpointsClientBeginDeleteOptions contains the optional parameters for the OutboundEndpointsClient.BeginDelete method.
type OutboundEndpointsClientBeginUpdateOptions ¶
type OutboundEndpointsClientBeginUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
OutboundEndpointsClientBeginUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginUpdate method.
type OutboundEndpointsClientCreateOrUpdateResponse ¶
type OutboundEndpointsClientCreateOrUpdateResponse struct {
OutboundEndpoint
}
OutboundEndpointsClientCreateOrUpdateResponse contains the response from method OutboundEndpointsClient.CreateOrUpdate.
type OutboundEndpointsClientDeleteResponse ¶
type OutboundEndpointsClientDeleteResponse struct { }
OutboundEndpointsClientDeleteResponse contains the response from method OutboundEndpointsClient.Delete.
type OutboundEndpointsClientGetOptions ¶
type OutboundEndpointsClientGetOptions struct { }
OutboundEndpointsClientGetOptions contains the optional parameters for the OutboundEndpointsClient.Get method.
type OutboundEndpointsClientGetResponse ¶
type OutboundEndpointsClientGetResponse struct {
OutboundEndpoint
}
OutboundEndpointsClientGetResponse contains the response from method OutboundEndpointsClient.Get.
type OutboundEndpointsClientListOptions ¶
type OutboundEndpointsClientListOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
OutboundEndpointsClientListOptions contains the optional parameters for the OutboundEndpointsClient.List method.
type OutboundEndpointsClientListResponse ¶
type OutboundEndpointsClientListResponse struct {
OutboundEndpointListResult
}
OutboundEndpointsClientListResponse contains the response from method OutboundEndpointsClient.List.
type OutboundEndpointsClientUpdateResponse ¶
type OutboundEndpointsClientUpdateResponse struct {
OutboundEndpoint
}
OutboundEndpointsClientUpdateResponse contains the response from method OutboundEndpointsClient.Update.
type Patch ¶
Patch - Describes a DNS resolver for PATCH operation.
func (Patch) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Patch.
type Properties ¶
type Properties struct { // REQUIRED; The reference to the virtual network. This cannot be changed after creation. VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` // READ-ONLY; The current status of the DNS resolver. This is a read-only property and any attempt to set this value will // be ignored. DNSResolverState *DNSResolverState `json:"dnsResolverState,omitempty" azure:"ro"` // READ-ONLY; The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this // value will be ignored. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; The resourceGuid property of the DNS resolver resource. ResourceGUID *string `json:"resourceGuid,omitempty" azure:"ro"` }
Properties - Represents the properties of a DNS resolver.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The current provisioning state of the resource.
const ( ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
type SubResource ¶
type SubResource struct { // Resource ID. ID *string `json:"id,omitempty"` }
SubResource - Reference to another ARM resource.
type SubResourceListResult ¶
type SubResourceListResult struct { // Enumeration of the sub-resources. Value []*SubResource `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
SubResourceListResult - The response to an enumeration operation on sub-resources.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type TargetDNSServer ¶
type TargetDNSServer struct { // DNS server IP address. IPAddress *string `json:"ipAddress,omitempty"` // DNS server port. Port *int32 `json:"port,omitempty"` }
TargetDNSServer - Describes a server to forward the DNS queries to.
type TrackedResource ¶
type TrackedResource struct { // REQUIRED; The geo-location where the resource lives Location *string `json:"location,omitempty"` // Resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
type VirtualNetworkDNSForwardingRuleset ¶
type VirtualNetworkDNSForwardingRuleset struct { // DNS Forwarding Ruleset Resource ID. ID *string `json:"id,omitempty"` // Properties of the virtual network link sub-resource reference. Properties *VirtualNetworkLinkSubResourceProperties `json:"properties,omitempty"` }
VirtualNetworkDNSForwardingRuleset - Reference to DNS forwarding ruleset and associated virtual network link.
type VirtualNetworkDNSForwardingRulesetListResult ¶
type VirtualNetworkDNSForwardingRulesetListResult struct { // Enumeration of the Virtual Network DNS Forwarding Ruleset. Value []*VirtualNetworkDNSForwardingRuleset `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
VirtualNetworkDNSForwardingRulesetListResult - The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset.
type VirtualNetworkLink ¶
type VirtualNetworkLink struct { // Properties of the virtual network link. Properties *VirtualNetworkLinkProperties `json:"properties,omitempty"` // READ-ONLY; ETag of the virtual network link. Etag *string `json:"etag,omitempty" azure:"ro"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Metadata pertaining to creation and last modification of the resource. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
VirtualNetworkLink - Describes a virtual network link.
type VirtualNetworkLinkListResult ¶
type VirtualNetworkLinkListResult struct { // Enumeration of the virtual network links. Value []*VirtualNetworkLink `json:"value,omitempty"` // READ-ONLY; The continuation token for the next page of results. NextLink *string `json:"nextLink,omitempty" azure:"ro"` }
VirtualNetworkLinkListResult - The response to an enumeration operation on virtual network links.
type VirtualNetworkLinkPatch ¶
type VirtualNetworkLinkPatch struct { // Updatable properties of the virtual network link. Properties *VirtualNetworkLinkPatchProperties `json:"properties,omitempty"` }
VirtualNetworkLinkPatch - Describes a virtual network link for PATCH operation.
func (VirtualNetworkLinkPatch) MarshalJSON ¶
func (v VirtualNetworkLinkPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkPatch.
type VirtualNetworkLinkPatchProperties ¶
type VirtualNetworkLinkPatchProperties struct { // Metadata attached to the virtual network link. Metadata map[string]*string `json:"metadata,omitempty"` }
VirtualNetworkLinkPatchProperties - Represents the updatable properties of the virtual network link.
func (VirtualNetworkLinkPatchProperties) MarshalJSON ¶
func (v VirtualNetworkLinkPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkPatchProperties.
type VirtualNetworkLinkProperties ¶
type VirtualNetworkLinkProperties struct { // Metadata attached to the virtual network link. Metadata map[string]*string `json:"metadata,omitempty"` // The reference to the virtual network. This cannot be changed after creation. VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` // READ-ONLY; The current provisioning state of the virtual network link. This is a read-only property and any attempt to // set this value will be ignored. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
VirtualNetworkLinkProperties - Represents the properties of a virtual network link.
func (VirtualNetworkLinkProperties) MarshalJSON ¶
func (v VirtualNetworkLinkProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkProperties.
type VirtualNetworkLinkSubResourceProperties ¶
type VirtualNetworkLinkSubResourceProperties struct { // The reference to the virtual network link. VirtualNetworkLink *SubResource `json:"virtualNetworkLink,omitempty"` }
VirtualNetworkLinkSubResourceProperties - The reference to the virtual network link that associates between the DNS forwarding ruleset and virtual network.
type VirtualNetworkLinksClient ¶
type VirtualNetworkLinksClient struct {
// contains filtered or unexported fields
}
VirtualNetworkLinksClient contains the methods for the VirtualNetworkLinks group. Don't use this type directly, use NewVirtualNetworkLinksClient() instead.
func NewVirtualNetworkLinksClient ¶
func NewVirtualNetworkLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkLinksClient, error)
NewVirtualNetworkLinksClient creates a new instance of VirtualNetworkLinksClient with the specified values. subscriptionID - The ID of the target subscription. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VirtualNetworkLinksClient) BeginCreateOrUpdate ¶
func (client *VirtualNetworkLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, parameters VirtualNetworkLink, options *VirtualNetworkLinksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkLinksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates or updates a virtual network link to a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. virtualNetworkLinkName - The name of the virtual network link. parameters - Parameters supplied to the CreateOrUpdate operation. options - VirtualNetworkLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/VirtualNetworkLink_Put.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewVirtualNetworkLinksClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", armdnsresolver.VirtualNetworkLink{ Properties: &armdnsresolver.VirtualNetworkLinkProperties{ Metadata: map[string]*string{ "additionalProp1": to.Ptr("value1"), }, VirtualNetwork: &armdnsresolver.SubResource{ ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), }, }, }, &armdnsresolver.VirtualNetworkLinksClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworkLinksClient) BeginDelete ¶
func (client *VirtualNetworkLinksClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, options *VirtualNetworkLinksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkLinksClientDeleteResponse], error)
BeginDelete - Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. virtualNetworkLinkName - The name of the virtual network link. options - VirtualNetworkLinksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/VirtualNetworkLink_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewVirtualNetworkLinksClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", &armdnsresolver.VirtualNetworkLinksClientBeginDeleteOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*VirtualNetworkLinksClient) BeginUpdate ¶
func (client *VirtualNetworkLinksClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, parameters VirtualNetworkLinkPatch, options *VirtualNetworkLinksClientBeginUpdateOptions) (*runtime.Poller[VirtualNetworkLinksClientUpdateResponse], error)
BeginUpdate - Updates a virtual network link to a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. virtualNetworkLinkName - The name of the virtual network link. parameters - Parameters supplied to the Update operation. options - VirtualNetworkLinksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/VirtualNetworkLink_Patch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewVirtualNetworkLinksClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", armdnsresolver.VirtualNetworkLinkPatch{ Properties: &armdnsresolver.VirtualNetworkLinkPatchProperties{ Metadata: map[string]*string{ "additionalProp1": to.Ptr("value1"), }, }, }, &armdnsresolver.VirtualNetworkLinksClientBeginUpdateOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworkLinksClient) Get ¶
func (client *VirtualNetworkLinksClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, options *VirtualNetworkLinksClientGetOptions) (VirtualNetworkLinksClientGetResponse, error)
Get - Gets properties of a virtual network link to a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. virtualNetworkLinkName - The name of the virtual network link. options - VirtualNetworkLinksClientGetOptions contains the optional parameters for the VirtualNetworkLinksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/VirtualNetworkLink_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewVirtualNetworkLinksClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworkLinksClient) NewListPager ¶ added in v0.3.0
func (client *VirtualNetworkLinksClient) NewListPager(resourceGroupName string, dnsForwardingRulesetName string, options *VirtualNetworkLinksClientListOptions) *runtime.Pager[VirtualNetworkLinksClientListResponse]
NewListPager - Lists virtual network links to a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-04-01-preview resourceGroupName - The name of the resource group. The name is case insensitive. dnsForwardingRulesetName - The name of the DNS forwarding ruleset. options - VirtualNetworkLinksClientListOptions contains the optional parameters for the VirtualNetworkLinksClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2020-04-01-preview/examples/VirtualNetworkLink_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armdnsresolver.NewVirtualNetworkLinksClient("abdd4249-9f34-4cc6-8e42-c2e32110603e", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("sampleResourceGroup", "sampleDnsForwardingRuleset", &armdnsresolver.VirtualNetworkLinksClientListOptions{Top: nil}) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VirtualNetworkLinksClientBeginCreateOrUpdateOptions ¶
type VirtualNetworkLinksClientBeginCreateOrUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. IfNoneMatch *string // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginCreateOrUpdate method.
type VirtualNetworkLinksClientBeginDeleteOptions ¶
type VirtualNetworkLinksClientBeginDeleteOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkLinksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginDelete method.
type VirtualNetworkLinksClientBeginUpdateOptions ¶
type VirtualNetworkLinksClientBeginUpdateOptions struct { // ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent // accidentally overwriting any concurrent changes. IfMatch *string // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworkLinksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginUpdate method.
type VirtualNetworkLinksClientCreateOrUpdateResponse ¶
type VirtualNetworkLinksClientCreateOrUpdateResponse struct {
VirtualNetworkLink
}
VirtualNetworkLinksClientCreateOrUpdateResponse contains the response from method VirtualNetworkLinksClient.CreateOrUpdate.
type VirtualNetworkLinksClientDeleteResponse ¶
type VirtualNetworkLinksClientDeleteResponse struct { }
VirtualNetworkLinksClientDeleteResponse contains the response from method VirtualNetworkLinksClient.Delete.
type VirtualNetworkLinksClientGetOptions ¶
type VirtualNetworkLinksClientGetOptions struct { }
VirtualNetworkLinksClientGetOptions contains the optional parameters for the VirtualNetworkLinksClient.Get method.
type VirtualNetworkLinksClientGetResponse ¶
type VirtualNetworkLinksClientGetResponse struct {
VirtualNetworkLink
}
VirtualNetworkLinksClientGetResponse contains the response from method VirtualNetworkLinksClient.Get.
type VirtualNetworkLinksClientListOptions ¶
type VirtualNetworkLinksClientListOptions struct { // The maximum number of results to return. If not specified, returns up to 100 results. Top *int32 }
VirtualNetworkLinksClientListOptions contains the optional parameters for the VirtualNetworkLinksClient.List method.
type VirtualNetworkLinksClientListResponse ¶
type VirtualNetworkLinksClientListResponse struct {
VirtualNetworkLinkListResult
}
VirtualNetworkLinksClientListResponse contains the response from method VirtualNetworkLinksClient.List.
type VirtualNetworkLinksClientUpdateResponse ¶
type VirtualNetworkLinksClientUpdateResponse struct {
VirtualNetworkLink
}
VirtualNetworkLinksClientUpdateResponse contains the response from method VirtualNetworkLinksClient.Update.
Source Files ¶
- build.go
- zz_generated_constants.go
- zz_generated_dnsforwardingrulesets_client.go
- zz_generated_dnsresolvers_client.go
- zz_generated_forwardingrules_client.go
- zz_generated_inboundendpoints_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_outboundendpoints_client.go
- zz_generated_response_types.go
- zz_generated_time_rfc3339.go
- zz_generated_virtualnetworklinks_client.go