networkstatus

package
v0.20240320.1000025 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/networkstatus Documentation

The networkstatus SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-03-01-preview).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-03-01-preview/networkstatus"

Client Initialization

client := networkstatus.NewNetworkStatusClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NetworkStatusClient.ListByLocation

ctx := context.TODO()
id := networkstatus.NewLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "locationValue")

read, err := client.ListByLocation(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: NetworkStatusClient.ListByService

ctx := context.TODO()
id := networkstatus.NewServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue")

read, err := client.ListByService(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForConnectivityStatusType

func PossibleValuesForConnectivityStatusType() []string

func ValidateLocationID

func ValidateLocationID(input interface{}, key string) (warnings []string, errors []error)

ValidateLocationID checks that 'input' can be parsed as a Location ID

func ValidateServiceID

func ValidateServiceID(input interface{}, key string) (warnings []string, errors []error)

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type ConnectivityStatusContract

type ConnectivityStatusContract struct {
	Error            *string                `json:"error,omitempty"`
	IsOptional       bool                   `json:"isOptional"`
	LastStatusChange string                 `json:"lastStatusChange"`
	LastUpdated      string                 `json:"lastUpdated"`
	Name             string                 `json:"name"`
	ResourceType     string                 `json:"resourceType"`
	Status           ConnectivityStatusType `json:"status"`
}

func (*ConnectivityStatusContract) GetLastStatusChangeAsTime

func (o *ConnectivityStatusContract) GetLastStatusChangeAsTime() (*time.Time, error)

func (*ConnectivityStatusContract) GetLastUpdatedAsTime

func (o *ConnectivityStatusContract) GetLastUpdatedAsTime() (*time.Time, error)

func (*ConnectivityStatusContract) SetLastStatusChangeAsTime

func (o *ConnectivityStatusContract) SetLastStatusChangeAsTime(input time.Time)

func (*ConnectivityStatusContract) SetLastUpdatedAsTime

func (o *ConnectivityStatusContract) SetLastUpdatedAsTime(input time.Time)

type ConnectivityStatusType

type ConnectivityStatusType string
const (
	ConnectivityStatusTypeFailure      ConnectivityStatusType = "failure"
	ConnectivityStatusTypeInitializing ConnectivityStatusType = "initializing"
	ConnectivityStatusTypeSuccess      ConnectivityStatusType = "success"
)

func (*ConnectivityStatusType) UnmarshalJSON

func (s *ConnectivityStatusType) UnmarshalJSON(bytes []byte) error

type ListByLocationOperationResponse

type ListByLocationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *NetworkStatusContract
}

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]NetworkStatusContractByLocation
}

type LocationId

type LocationId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	LocationName      string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, resourceGroupName string, serviceName string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

ParseLocationIDInsensitively parses 'input' case-insensitively into a LocationId note: this method should only be used for API response data and not user input

func (*LocationId) FromParseResult

func (id *LocationId) FromParseResult(input resourceids.ParseResult) error

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

func (id LocationId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Location ID

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type NetworkStatusClient

type NetworkStatusClient struct {
	Client *resourcemanager.Client
}

func NewNetworkStatusClientWithBaseURI

func NewNetworkStatusClientWithBaseURI(sdkApi sdkEnv.Api) (*NetworkStatusClient, error)

func (NetworkStatusClient) ListByLocation

func (c NetworkStatusClient) ListByLocation(ctx context.Context, id LocationId) (result ListByLocationOperationResponse, err error)

ListByLocation ...

func (NetworkStatusClient) ListByService

func (c NetworkStatusClient) ListByService(ctx context.Context, id ServiceId) (result ListByServiceOperationResponse, err error)

ListByService ...

type NetworkStatusContract

type NetworkStatusContract struct {
	ConnectivityStatus []ConnectivityStatusContract `json:"connectivityStatus"`
	DnsServers         []string                     `json:"dnsServers"`
}

type NetworkStatusContractByLocation

type NetworkStatusContractByLocation struct {
	Location      *string                `json:"location,omitempty"`
	NetworkStatus *NetworkStatusContract `json:"networkStatus,omitempty"`
}

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

ParseServiceIDInsensitively parses 'input' case-insensitively into a ServiceId note: this method should only be used for API response data and not user input

func (*ServiceId) FromParseResult

func (id *ServiceId) FromParseResult(input resourceids.ParseResult) error

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

func (id ServiceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

Jump to

Keyboard shortcuts

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