Documentation ¶
Index ¶
- type BandwidthOffer
- type BgpSession
- type CdnPeeringPrefix
- type CdnPeeringPrefixListResult
- type CdnPeeringPrefixProperties
- type CdnPeeringPrefixesClient
- type CdnPeeringPrefixesClientListOptions
- type CdnPeeringPrefixesClientListResponse
- type CheckServiceProviderAvailabilityInput
- type Command
- type ConnectionMonitorTest
- type ConnectionMonitorTestListResult
- type ConnectionMonitorTestProperties
- type ConnectionMonitorTestsClient
- func (client *ConnectionMonitorTestsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (ConnectionMonitorTestsClientCreateOrUpdateResponse, error)
- func (client *ConnectionMonitorTestsClient) Delete(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (ConnectionMonitorTestsClientDeleteResponse, error)
- func (client *ConnectionMonitorTestsClient) Get(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (ConnectionMonitorTestsClientGetResponse, error)
- func (client *ConnectionMonitorTestsClient) NewListByPeeringServicePager(resourceGroupName string, peeringServiceName string, ...) *runtime.Pager[ConnectionMonitorTestsClientListByPeeringServiceResponse]
- type ConnectionMonitorTestsClientCreateOrUpdateOptions
- type ConnectionMonitorTestsClientCreateOrUpdateResponse
- type ConnectionMonitorTestsClientDeleteOptions
- type ConnectionMonitorTestsClientDeleteResponse
- type ConnectionMonitorTestsClientGetOptions
- type ConnectionMonitorTestsClientGetResponse
- type ConnectionMonitorTestsClientListByPeeringServiceOptions
- type ConnectionMonitorTestsClientListByPeeringServiceResponse
- type ConnectionState
- type ContactDetail
- type DirectConnection
- type DirectPeeringFacility
- type DirectPeeringType
- type Enum0
- type ErrorDetail
- type ErrorResponse
- type ExchangeConnection
- type ExchangePeeringFacility
- type Family
- type Kind
- type LearnedType
- type LegacyPeeringsClient
- type LegacyPeeringsClientListOptions
- type LegacyPeeringsClientListResponse
- type LegacyPeeringsKind
- type ListResult
- type Location
- type LocationListResult
- type LocationProperties
- type LocationPropertiesDirect
- type LocationPropertiesExchange
- type LocationsClient
- type LocationsClientListOptions
- type LocationsClientListResponse
- type LogAnalyticsWorkspaceProperties
- type LookingGlassClient
- type LookingGlassClientInvokeOptions
- type LookingGlassClientInvokeResponse
- type LookingGlassCommand
- type LookingGlassOutput
- type LookingGlassSourceType
- type ManagementClient
- type ManagementClientCheckServiceProviderAvailabilityOptions
- type ManagementClientCheckServiceProviderAvailabilityResponse
- type MetricDimension
- type MetricSpecification
- type Operation
- type OperationDisplayInfo
- type OperationListResult
- type OperationProperties
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PeerAsn
- type PeerAsnListResult
- type PeerAsnProperties
- type PeerAsnsClient
- func (client *PeerAsnsClient) CreateOrUpdate(ctx context.Context, peerAsnName string, peerAsn PeerAsn, ...) (PeerAsnsClientCreateOrUpdateResponse, error)
- func (client *PeerAsnsClient) Delete(ctx context.Context, peerAsnName string, options *PeerAsnsClientDeleteOptions) (PeerAsnsClientDeleteResponse, error)
- func (client *PeerAsnsClient) Get(ctx context.Context, peerAsnName string, options *PeerAsnsClientGetOptions) (PeerAsnsClientGetResponse, error)
- func (client *PeerAsnsClient) NewListBySubscriptionPager(options *PeerAsnsClientListBySubscriptionOptions) *runtime.Pager[PeerAsnsClientListBySubscriptionResponse]
- type PeerAsnsClientCreateOrUpdateOptions
- type PeerAsnsClientCreateOrUpdateResponse
- type PeerAsnsClientDeleteOptions
- type PeerAsnsClientDeleteResponse
- type PeerAsnsClientGetOptions
- type PeerAsnsClientGetResponse
- type PeerAsnsClientListBySubscriptionOptions
- type PeerAsnsClientListBySubscriptionResponse
- type Peering
- type PeeringLocationsDirectPeeringType
- type PeeringLocationsKind
- type PeeringsClient
- func (client *PeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringName string, ...) (PeeringsClientCreateOrUpdateResponse, error)
- func (client *PeeringsClient) Delete(ctx context.Context, resourceGroupName string, peeringName string, ...) (PeeringsClientDeleteResponse, error)
- func (client *PeeringsClient) Get(ctx context.Context, resourceGroupName string, peeringName string, ...) (PeeringsClientGetResponse, error)
- func (client *PeeringsClient) NewListByResourceGroupPager(resourceGroupName string, options *PeeringsClientListByResourceGroupOptions) *runtime.Pager[PeeringsClientListByResourceGroupResponse]
- func (client *PeeringsClient) NewListBySubscriptionPager(options *PeeringsClientListBySubscriptionOptions) *runtime.Pager[PeeringsClientListBySubscriptionResponse]
- func (client *PeeringsClient) Update(ctx context.Context, resourceGroupName string, peeringName string, ...) (PeeringsClientUpdateResponse, error)
- type PeeringsClientCreateOrUpdateOptions
- type PeeringsClientCreateOrUpdateResponse
- type PeeringsClientDeleteOptions
- type PeeringsClientDeleteResponse
- type PeeringsClientGetOptions
- type PeeringsClientGetResponse
- type PeeringsClientListByResourceGroupOptions
- type PeeringsClientListByResourceGroupResponse
- type PeeringsClientListBySubscriptionOptions
- type PeeringsClientListBySubscriptionResponse
- type PeeringsClientUpdateOptions
- type PeeringsClientUpdateResponse
- type PrefixValidationState
- type PrefixesClient
- func (client *PrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (PrefixesClientCreateOrUpdateResponse, error)
- func (client *PrefixesClient) Delete(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (PrefixesClientDeleteResponse, error)
- func (client *PrefixesClient) Get(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (PrefixesClientGetResponse, error)
- func (client *PrefixesClient) NewListByPeeringServicePager(resourceGroupName string, peeringServiceName string, ...) *runtime.Pager[PrefixesClientListByPeeringServiceResponse]
- type PrefixesClientCreateOrUpdateOptions
- type PrefixesClientCreateOrUpdateResponse
- type PrefixesClientDeleteOptions
- type PrefixesClientDeleteResponse
- type PrefixesClientGetOptions
- type PrefixesClientGetResponse
- type PrefixesClientListByPeeringServiceOptions
- type PrefixesClientListByPeeringServiceResponse
- type Properties
- type PropertiesDirect
- type PropertiesExchange
- type ProvisioningState
- type ReceivedRoute
- type ReceivedRouteListResult
- type ReceivedRoutesClient
- type ReceivedRoutesClientListByPeeringOptions
- type ReceivedRoutesClientListByPeeringResponse
- type RegisteredAsn
- type RegisteredAsnListResult
- type RegisteredAsnProperties
- type RegisteredAsnsClient
- func (client *RegisteredAsnsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringName string, ...) (RegisteredAsnsClientCreateOrUpdateResponse, error)
- func (client *RegisteredAsnsClient) Delete(ctx context.Context, resourceGroupName string, peeringName string, ...) (RegisteredAsnsClientDeleteResponse, error)
- func (client *RegisteredAsnsClient) Get(ctx context.Context, resourceGroupName string, peeringName string, ...) (RegisteredAsnsClientGetResponse, error)
- func (client *RegisteredAsnsClient) NewListByPeeringPager(resourceGroupName string, peeringName string, ...) *runtime.Pager[RegisteredAsnsClientListByPeeringResponse]
- type RegisteredAsnsClientCreateOrUpdateOptions
- type RegisteredAsnsClientCreateOrUpdateResponse
- type RegisteredAsnsClientDeleteOptions
- type RegisteredAsnsClientDeleteResponse
- type RegisteredAsnsClientGetOptions
- type RegisteredAsnsClientGetResponse
- type RegisteredAsnsClientListByPeeringOptions
- type RegisteredAsnsClientListByPeeringResponse
- type RegisteredPrefix
- type RegisteredPrefixListResult
- type RegisteredPrefixProperties
- type RegisteredPrefixesClient
- func (client *RegisteredPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringName string, ...) (RegisteredPrefixesClientCreateOrUpdateResponse, error)
- func (client *RegisteredPrefixesClient) Delete(ctx context.Context, resourceGroupName string, peeringName string, ...) (RegisteredPrefixesClientDeleteResponse, error)
- func (client *RegisteredPrefixesClient) Get(ctx context.Context, resourceGroupName string, peeringName string, ...) (RegisteredPrefixesClientGetResponse, error)
- func (client *RegisteredPrefixesClient) NewListByPeeringPager(resourceGroupName string, peeringName string, ...) *runtime.Pager[RegisteredPrefixesClientListByPeeringResponse]
- type RegisteredPrefixesClientCreateOrUpdateOptions
- type RegisteredPrefixesClientCreateOrUpdateResponse
- type RegisteredPrefixesClientDeleteOptions
- type RegisteredPrefixesClientDeleteResponse
- type RegisteredPrefixesClientGetOptions
- type RegisteredPrefixesClientGetResponse
- type RegisteredPrefixesClientListByPeeringOptions
- type RegisteredPrefixesClientListByPeeringResponse
- type Resource
- type ResourceTags
- type Role
- type SKU
- type Service
- type ServiceCountriesClient
- type ServiceCountriesClientListOptions
- type ServiceCountriesClientListResponse
- type ServiceCountry
- type ServiceCountryListResult
- type ServiceListResult
- type ServiceLocation
- type ServiceLocationListResult
- type ServiceLocationProperties
- type ServiceLocationsClient
- type ServiceLocationsClientListOptions
- type ServiceLocationsClientListResponse
- type ServicePrefix
- type ServicePrefixEvent
- type ServicePrefixListResult
- type ServicePrefixProperties
- type ServiceProperties
- type ServiceProvider
- type ServiceProviderListResult
- type ServiceProviderProperties
- type ServiceProvidersClient
- type ServiceProvidersClientListOptions
- type ServiceProvidersClientListResponse
- type ServiceSKU
- type ServiceSpecification
- type ServicesClient
- func (client *ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (ServicesClientCreateOrUpdateResponse, error)
- func (client *ServicesClient) Delete(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (ServicesClientDeleteResponse, error)
- func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (ServicesClientGetResponse, error)
- func (client *ServicesClient) InitializeConnectionMonitor(ctx context.Context, options *ServicesClientInitializeConnectionMonitorOptions) (ServicesClientInitializeConnectionMonitorResponse, error)
- func (client *ServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]
- func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse]
- func (client *ServicesClient) Update(ctx context.Context, resourceGroupName string, peeringServiceName string, ...) (ServicesClientUpdateResponse, error)
- type ServicesClientCreateOrUpdateOptions
- type ServicesClientCreateOrUpdateResponse
- type ServicesClientDeleteOptions
- type ServicesClientDeleteResponse
- type ServicesClientGetOptions
- type ServicesClientGetResponse
- type ServicesClientInitializeConnectionMonitorOptions
- type ServicesClientInitializeConnectionMonitorResponse
- type ServicesClientListByResourceGroupOptions
- type ServicesClientListByResourceGroupResponse
- type ServicesClientListBySubscriptionOptions
- type ServicesClientListBySubscriptionResponse
- type ServicesClientUpdateOptions
- type ServicesClientUpdateResponse
- type SessionAddressProvider
- type SessionStateV4
- type SessionStateV6
- type Size
- type SubResource
- type Tier
- type ValidationState
Examples ¶
- CdnPeeringPrefixesClient.NewListPager
- ConnectionMonitorTestsClient.CreateOrUpdate
- ConnectionMonitorTestsClient.Delete
- ConnectionMonitorTestsClient.Get
- ConnectionMonitorTestsClient.NewListByPeeringServicePager
- LegacyPeeringsClient.NewListPager
- LocationsClient.NewListPager
- LookingGlassClient.Invoke
- ManagementClient.CheckServiceProviderAvailability
- OperationsClient.NewListPager
- PeerAsnsClient.CreateOrUpdate
- PeerAsnsClient.Delete
- PeerAsnsClient.Get
- PeerAsnsClient.NewListBySubscriptionPager
- PeeringsClient.CreateOrUpdate
- PeeringsClient.Delete
- PeeringsClient.Get
- PeeringsClient.NewListByResourceGroupPager
- PeeringsClient.NewListBySubscriptionPager
- PeeringsClient.Update
- PrefixesClient.CreateOrUpdate
- PrefixesClient.Delete
- PrefixesClient.Get
- PrefixesClient.NewListByPeeringServicePager
- ReceivedRoutesClient.NewListByPeeringPager
- RegisteredAsnsClient.CreateOrUpdate
- RegisteredAsnsClient.Delete
- RegisteredAsnsClient.Get
- RegisteredAsnsClient.NewListByPeeringPager
- RegisteredPrefixesClient.CreateOrUpdate
- RegisteredPrefixesClient.Delete
- RegisteredPrefixesClient.Get
- RegisteredPrefixesClient.NewListByPeeringPager
- ServiceCountriesClient.NewListPager
- ServiceLocationsClient.NewListPager
- ServiceProvidersClient.NewListPager
- ServicesClient.CreateOrUpdate
- ServicesClient.Delete
- ServicesClient.Get
- ServicesClient.InitializeConnectionMonitor
- ServicesClient.NewListByResourceGroupPager
- ServicesClient.NewListBySubscriptionPager
- ServicesClient.Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BandwidthOffer ¶ added in v0.2.0
type BandwidthOffer struct { // The name of the bandwidth offer. OfferName *string `json:"offerName,omitempty"` // The value of the bandwidth offer in Mbps. ValueInMbps *int32 `json:"valueInMbps,omitempty"` }
BandwidthOffer - The properties that define a peering bandwidth offer.
type BgpSession ¶
type BgpSession struct { // The MD5 authentication key of the session. MD5AuthenticationKey *string `json:"md5AuthenticationKey,omitempty"` // The maximum number of prefixes advertised over the IPv4 session. MaxPrefixesAdvertisedV4 *int32 `json:"maxPrefixesAdvertisedV4,omitempty"` // The maximum number of prefixes advertised over the IPv6 session. MaxPrefixesAdvertisedV6 *int32 `json:"maxPrefixesAdvertisedV6,omitempty"` // The IPv4 session address on Microsoft's end. MicrosoftSessionIPv4Address *string `json:"microsoftSessionIPv4Address,omitempty"` // The IPv6 session address on Microsoft's end. MicrosoftSessionIPv6Address *string `json:"microsoftSessionIPv6Address,omitempty"` // The IPv4 session address on peer's end. PeerSessionIPv4Address *string `json:"peerSessionIPv4Address,omitempty"` // The IPv6 session address on peer's end. PeerSessionIPv6Address *string `json:"peerSessionIPv6Address,omitempty"` // The IPv4 prefix that contains both ends' IPv4 addresses. SessionPrefixV4 *string `json:"sessionPrefixV4,omitempty"` // The IPv6 prefix that contains both ends' IPv6 addresses. SessionPrefixV6 *string `json:"sessionPrefixV6,omitempty"` // READ-ONLY; The state of the IPv4 session. SessionStateV4 *SessionStateV4 `json:"sessionStateV4,omitempty" azure:"ro"` // READ-ONLY; The state of the IPv6 session. SessionStateV6 *SessionStateV6 `json:"sessionStateV6,omitempty" azure:"ro"` }
BgpSession - The properties that define a BGP session.
type CdnPeeringPrefix ¶ added in v0.3.0
type CdnPeeringPrefix struct { // The properties that define a cdn peering prefix. Properties *CdnPeeringPrefixProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
CdnPeeringPrefix - The CDN peering prefix
type CdnPeeringPrefixListResult ¶ added in v0.3.0
type CdnPeeringPrefixListResult struct { // The link to fetch the next page of CDN peering prefixes. NextLink *string `json:"nextLink,omitempty"` // The list of CDN peering prefixes. Value []*CdnPeeringPrefix `json:"value,omitempty"` }
CdnPeeringPrefixListResult - The paginated list of CDN peering prefixes.
type CdnPeeringPrefixProperties ¶ added in v0.3.0
type CdnPeeringPrefixProperties struct { // READ-ONLY; The Azure region. AzureRegion *string `json:"azureRegion,omitempty" azure:"ro"` // READ-ONLY; The Azure service. AzureService *string `json:"azureService,omitempty" azure:"ro"` // READ-ONLY; The BGP Community BgpCommunity *string `json:"bgpCommunity,omitempty" azure:"ro"` // READ-ONLY; The flag that indicates whether or not this is the primary region. IsPrimaryRegion *bool `json:"isPrimaryRegion,omitempty" azure:"ro"` // READ-ONLY; The prefix. Prefix *string `json:"prefix,omitempty" azure:"ro"` }
CdnPeeringPrefixProperties - The properties that define a CDN peering prefix
type CdnPeeringPrefixesClient ¶ added in v0.3.0
type CdnPeeringPrefixesClient struct {
// contains filtered or unexported fields
}
CdnPeeringPrefixesClient contains the methods for the CdnPeeringPrefixes group. Don't use this type directly, use NewCdnPeeringPrefixesClient() instead.
func NewCdnPeeringPrefixesClient ¶ added in v0.3.0
func NewCdnPeeringPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CdnPeeringPrefixesClient, error)
NewCdnPeeringPrefixesClient creates a new instance of CdnPeeringPrefixesClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*CdnPeeringPrefixesClient) NewListPager ¶ added in v0.5.0
func (client *CdnPeeringPrefixesClient) NewListPager(peeringLocation string, options *CdnPeeringPrefixesClientListOptions) *runtime.Pager[CdnPeeringPrefixesClientListResponse]
NewListPager - Lists all of the advertised prefixes for the specified peering location If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 peeringLocation - The peering location. options - CdnPeeringPrefixesClientListOptions contains the optional parameters for the CdnPeeringPrefixesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListCdnPeeringPrefixes.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewCdnPeeringPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("peeringLocation0", 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 CdnPeeringPrefixesClientListOptions ¶ added in v0.3.0
type CdnPeeringPrefixesClientListOptions struct { }
CdnPeeringPrefixesClientListOptions contains the optional parameters for the CdnPeeringPrefixesClient.List method.
type CdnPeeringPrefixesClientListResponse ¶ added in v0.3.0
type CdnPeeringPrefixesClientListResponse struct {
CdnPeeringPrefixListResult
}
CdnPeeringPrefixesClientListResponse contains the response from method CdnPeeringPrefixesClient.List.
type CheckServiceProviderAvailabilityInput ¶
type CheckServiceProviderAvailabilityInput struct { // Gets or sets the peering service location. PeeringServiceLocation *string `json:"peeringServiceLocation,omitempty"` // Gets or sets the peering service provider. PeeringServiceProvider *string `json:"peeringServiceProvider,omitempty"` }
CheckServiceProviderAvailabilityInput - Class for CheckServiceProviderAvailabilityInput
type Command ¶ added in v0.3.0
type Command string
Command - Invoked command
func PossibleCommandValues ¶ added in v0.3.0
func PossibleCommandValues() []Command
PossibleCommandValues returns the possible values for the Command const type.
type ConnectionMonitorTest ¶ added in v0.3.0
type ConnectionMonitorTest struct { // The properties that define a Connection Monitor Test. Properties *ConnectionMonitorTestProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
ConnectionMonitorTest - The Connection Monitor Test class.
type ConnectionMonitorTestListResult ¶ added in v0.3.0
type ConnectionMonitorTestListResult struct { // The link to fetch the next page of [T]. NextLink *string `json:"nextLink,omitempty"` // The list of [T]. Value []*ConnectionMonitorTest `json:"value,omitempty"` }
ConnectionMonitorTestListResult - The paginated list of [T].
type ConnectionMonitorTestProperties ¶ added in v0.3.0
type ConnectionMonitorTestProperties struct { // The Connection Monitor test destination Destination *string `json:"destination,omitempty"` // The Connection Monitor test destination port DestinationPort *int32 `json:"destinationPort,omitempty"` // The Connection Monitor test source agent SourceAgent *string `json:"sourceAgent,omitempty"` // The Connection Monitor test frequency in seconds TestFrequencyInSec *int32 `json:"testFrequencyInSec,omitempty"` // READ-ONLY; The flag that indicates if the Connection Monitor test is successful or not. IsTestSuccessful *bool `json:"isTestSuccessful,omitempty" azure:"ro"` // READ-ONLY; The path representing the Connection Monitor test. Path []*string `json:"path,omitempty" azure:"ro"` // READ-ONLY; The provisioning state of the resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
ConnectionMonitorTestProperties - The properties that define a Connection Monitor Test.
func (ConnectionMonitorTestProperties) MarshalJSON ¶ added in v0.3.0
func (c ConnectionMonitorTestProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectionMonitorTestProperties.
type ConnectionMonitorTestsClient ¶ added in v0.3.0
type ConnectionMonitorTestsClient struct {
// contains filtered or unexported fields
}
ConnectionMonitorTestsClient contains the methods for the ConnectionMonitorTests group. Don't use this type directly, use NewConnectionMonitorTestsClient() instead.
func NewConnectionMonitorTestsClient ¶ added in v0.3.0
func NewConnectionMonitorTestsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ConnectionMonitorTestsClient, error)
NewConnectionMonitorTestsClient creates a new instance of ConnectionMonitorTestsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ConnectionMonitorTestsClient) CreateOrUpdate ¶ added in v0.3.0
func (client *ConnectionMonitorTestsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringServiceName string, connectionMonitorTestName string, connectionMonitorTest ConnectionMonitorTest, options *ConnectionMonitorTestsClientCreateOrUpdateOptions) (ConnectionMonitorTestsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates or updates a connection monitor test with the specified name under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. connectionMonitorTestName - The name of the connection monitor test connectionMonitorTest - The properties needed to create a connection monitor test options - ConnectionMonitorTestsClientCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorTestsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CreateOrUpdateConnectionMonitorTest.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewConnectionMonitorTestsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "rgName", "peeringServiceName", "connectionMonitorTestName", armpeering.ConnectionMonitorTest{ Properties: &armpeering.ConnectionMonitorTestProperties{ Destination: to.Ptr("Example Destination"), DestinationPort: to.Ptr[int32](443), SourceAgent: to.Ptr("Example Source Agent"), TestFrequencyInSec: to.Ptr[int32](30), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ConnectionMonitorTestsClient) Delete ¶ added in v0.3.0
func (client *ConnectionMonitorTestsClient) Delete(ctx context.Context, resourceGroupName string, peeringServiceName string, connectionMonitorTestName string, options *ConnectionMonitorTestsClientDeleteOptions) (ConnectionMonitorTestsClientDeleteResponse, error)
Delete - Deletes an existing connection monitor test with the specified name under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. connectionMonitorTestName - The name of the connection monitor test options - ConnectionMonitorTestsClientDeleteOptions contains the optional parameters for the ConnectionMonitorTestsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/DeleteConnectionMonitorTest.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewConnectionMonitorTestsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "rgName", "peeringServiceName", "connectionMonitorTestName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ConnectionMonitorTestsClient) Get ¶ added in v0.3.0
func (client *ConnectionMonitorTestsClient) Get(ctx context.Context, resourceGroupName string, peeringServiceName string, connectionMonitorTestName string, options *ConnectionMonitorTestsClientGetOptions) (ConnectionMonitorTestsClientGetResponse, error)
Get - Gets an existing connection monitor test with the specified name under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. connectionMonitorTestName - The name of the connection monitor test options - ConnectionMonitorTestsClientGetOptions contains the optional parameters for the ConnectionMonitorTestsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetConnectionMonitorTest.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewConnectionMonitorTestsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rgName", "peeringServiceName", "connectionMonitorTestName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ConnectionMonitorTestsClient) NewListByPeeringServicePager ¶ added in v0.5.0
func (client *ConnectionMonitorTestsClient) NewListByPeeringServicePager(resourceGroupName string, peeringServiceName string, options *ConnectionMonitorTestsClientListByPeeringServiceOptions) *runtime.Pager[ConnectionMonitorTestsClientListByPeeringServiceResponse]
NewListByPeeringServicePager - Lists all connection monitor tests under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. options - ConnectionMonitorTestsClientListByPeeringServiceOptions contains the optional parameters for the ConnectionMonitorTestsClient.ListByPeeringService method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListConnectionMonitorTestsByPeeringService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewConnectionMonitorTestsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByPeeringServicePager("rgName", "peeringServiceName", 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 ConnectionMonitorTestsClientCreateOrUpdateOptions ¶ added in v0.3.0
type ConnectionMonitorTestsClientCreateOrUpdateOptions struct { }
ConnectionMonitorTestsClientCreateOrUpdateOptions contains the optional parameters for the ConnectionMonitorTestsClient.CreateOrUpdate method.
type ConnectionMonitorTestsClientCreateOrUpdateResponse ¶ added in v0.3.0
type ConnectionMonitorTestsClientCreateOrUpdateResponse struct {
ConnectionMonitorTest
}
ConnectionMonitorTestsClientCreateOrUpdateResponse contains the response from method ConnectionMonitorTestsClient.CreateOrUpdate.
type ConnectionMonitorTestsClientDeleteOptions ¶ added in v0.3.0
type ConnectionMonitorTestsClientDeleteOptions struct { }
ConnectionMonitorTestsClientDeleteOptions contains the optional parameters for the ConnectionMonitorTestsClient.Delete method.
type ConnectionMonitorTestsClientDeleteResponse ¶ added in v0.3.0
type ConnectionMonitorTestsClientDeleteResponse struct { }
ConnectionMonitorTestsClientDeleteResponse contains the response from method ConnectionMonitorTestsClient.Delete.
type ConnectionMonitorTestsClientGetOptions ¶ added in v0.3.0
type ConnectionMonitorTestsClientGetOptions struct { }
ConnectionMonitorTestsClientGetOptions contains the optional parameters for the ConnectionMonitorTestsClient.Get method.
type ConnectionMonitorTestsClientGetResponse ¶ added in v0.3.0
type ConnectionMonitorTestsClientGetResponse struct {
ConnectionMonitorTest
}
ConnectionMonitorTestsClientGetResponse contains the response from method ConnectionMonitorTestsClient.Get.
type ConnectionMonitorTestsClientListByPeeringServiceOptions ¶ added in v0.3.0
type ConnectionMonitorTestsClientListByPeeringServiceOptions struct { }
ConnectionMonitorTestsClientListByPeeringServiceOptions contains the optional parameters for the ConnectionMonitorTestsClient.ListByPeeringService method.
type ConnectionMonitorTestsClientListByPeeringServiceResponse ¶ added in v0.3.0
type ConnectionMonitorTestsClientListByPeeringServiceResponse struct {
ConnectionMonitorTestListResult
}
ConnectionMonitorTestsClientListByPeeringServiceResponse contains the response from method ConnectionMonitorTestsClient.ListByPeeringService.
type ConnectionState ¶
type ConnectionState string
ConnectionState - The state of the connection.
const ( ConnectionStateActive ConnectionState = "Active" ConnectionStateApproved ConnectionState = "Approved" ConnectionStateNone ConnectionState = "None" ConnectionStatePendingApproval ConnectionState = "PendingApproval" ConnectionStateProvisioningCompleted ConnectionState = "ProvisioningCompleted" ConnectionStateProvisioningFailed ConnectionState = "ProvisioningFailed" ConnectionStateProvisioningStarted ConnectionState = "ProvisioningStarted" ConnectionStateValidating ConnectionState = "Validating" )
func PossibleConnectionStateValues ¶
func PossibleConnectionStateValues() []ConnectionState
PossibleConnectionStateValues returns the possible values for the ConnectionState const type.
type ContactDetail ¶ added in v0.3.0
type ContactDetail struct { // The e-mail address of the contact. Email *string `json:"email,omitempty"` // The phone number of the contact. Phone *string `json:"phone,omitempty"` // The role of the contact. Role *Role `json:"role,omitempty"` }
ContactDetail - The contact detail class.
type DirectConnection ¶
type DirectConnection struct { // The bandwidth of the connection. BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` // The BGP session associated with the connection. BgpSession *BgpSession `json:"bgpSession,omitempty"` // The unique identifier (GUID) for the connection. ConnectionIdentifier *string `json:"connectionIdentifier,omitempty"` // The PeeringDB.com ID of the facility at which the connection has to be set up. PeeringDBFacilityID *int32 `json:"peeringDBFacilityId,omitempty"` // The field indicating if Microsoft provides session ip addresses. SessionAddressProvider *SessionAddressProvider `json:"sessionAddressProvider,omitempty"` // The flag that indicates whether or not the connection is used for peering service. UseForPeeringService *bool `json:"useForPeeringService,omitempty"` // READ-ONLY; The state of the connection. ConnectionState *ConnectionState `json:"connectionState,omitempty" azure:"ro"` // READ-ONLY; The error message related to the connection state, if any. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; The ID used within Microsoft's peering provisioning system to track the connection MicrosoftTrackingID *string `json:"microsoftTrackingId,omitempty" azure:"ro"` // READ-ONLY; The bandwidth that is actually provisioned. ProvisionedBandwidthInMbps *int32 `json:"provisionedBandwidthInMbps,omitempty" azure:"ro"` }
DirectConnection - The properties that define a direct connection.
type DirectPeeringFacility ¶
type DirectPeeringFacility struct { // The address of the direct peering facility. Address *string `json:"address,omitempty"` // The type of the direct peering. DirectPeeringType *DirectPeeringType `json:"directPeeringType,omitempty"` // The PeeringDB.com ID of the facility. PeeringDBFacilityID *int32 `json:"peeringDBFacilityId,omitempty"` // The PeeringDB.com URL of the facility. PeeringDBFacilityLink *string `json:"peeringDBFacilityLink,omitempty"` }
DirectPeeringFacility - The properties that define a direct peering facility.
type DirectPeeringType ¶
type DirectPeeringType string
DirectPeeringType - The type of direct peering.
const ( DirectPeeringTypeCdn DirectPeeringType = "Cdn" DirectPeeringTypeEdge DirectPeeringType = "Edge" DirectPeeringTypeEdgeZoneForOperators DirectPeeringType = "EdgeZoneForOperators" DirectPeeringTypeInternal DirectPeeringType = "Internal" DirectPeeringTypeIx DirectPeeringType = "Ix" DirectPeeringTypeIxRs DirectPeeringType = "IxRs" DirectPeeringTypeTransit DirectPeeringType = "Transit" DirectPeeringTypeVoice DirectPeeringType = "Voice" )
func PossibleDirectPeeringTypeValues ¶
func PossibleDirectPeeringTypeValues() []DirectPeeringType
PossibleDirectPeeringTypeValues returns the possible values for the DirectPeeringType const type.
type Enum0 ¶
type Enum0 string
const ( Enum0Available Enum0 = "Available" )
func PossibleEnum0Values ¶
func PossibleEnum0Values() []Enum0
PossibleEnum0Values returns the possible values for the Enum0 const type.
type ErrorDetail ¶ added in v0.4.0
type ErrorDetail struct { // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error message. Message *string `json:"message,omitempty" azure:"ro"` }
ErrorDetail - The error detail that describes why an operation has failed.
type ErrorResponse ¶
type ErrorResponse struct { // The error detail that describes why an operation has failed. Error *ErrorDetail `json:"error,omitempty"` }
ErrorResponse - The error response that indicates why an operation has failed.
type ExchangeConnection ¶
type ExchangeConnection struct { // The BGP session associated with the connection. BgpSession *BgpSession `json:"bgpSession,omitempty"` // The unique identifier (GUID) for the connection. ConnectionIdentifier *string `json:"connectionIdentifier,omitempty"` // The PeeringDB.com ID of the facility at which the connection has to be set up. PeeringDBFacilityID *int32 `json:"peeringDBFacilityId,omitempty"` // READ-ONLY; The state of the connection. ConnectionState *ConnectionState `json:"connectionState,omitempty" azure:"ro"` // READ-ONLY; The error message related to the connection state, if any. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` }
ExchangeConnection - The properties that define an exchange connection.
type ExchangePeeringFacility ¶
type ExchangePeeringFacility struct { // The bandwidth of the connection between Microsoft and the exchange peering facility. BandwidthInMbps *int32 `json:"bandwidthInMbps,omitempty"` // The name of the exchange peering facility. ExchangeName *string `json:"exchangeName,omitempty"` // The IPv4 prefixes associated with the exchange peering facility. FacilityIPv4Prefix *string `json:"facilityIPv4Prefix,omitempty"` // The IPv6 prefixes associated with the exchange peering facility. FacilityIPv6Prefix *string `json:"facilityIPv6Prefix,omitempty"` // The IPv4 address of Microsoft at the exchange peering facility. MicrosoftIPv4Address *string `json:"microsoftIPv4Address,omitempty"` // The IPv6 address of Microsoft at the exchange peering facility. MicrosoftIPv6Address *string `json:"microsoftIPv6Address,omitempty"` // The PeeringDB.com ID of the facility. PeeringDBFacilityID *int32 `json:"peeringDBFacilityId,omitempty"` // The PeeringDB.com URL of the facility. PeeringDBFacilityLink *string `json:"peeringDBFacilityLink,omitempty"` }
ExchangePeeringFacility - The properties that define an exchange peering facility.
type Family ¶
type Family string
Family - The family of the peering SKU.
func PossibleFamilyValues ¶
func PossibleFamilyValues() []Family
PossibleFamilyValues returns the possible values for the Family const type.
type Kind ¶
type Kind string
Kind - The kind of the peering.
func PossibleKindValues ¶
func PossibleKindValues() []Kind
PossibleKindValues returns the possible values for the Kind const type.
type LearnedType ¶
type LearnedType string
LearnedType - The prefix learned type
const ( LearnedTypeNone LearnedType = "None" LearnedTypeViaServiceProvider LearnedType = "ViaServiceProvider" LearnedTypeViaSession LearnedType = "ViaSession" )
func PossibleLearnedTypeValues ¶
func PossibleLearnedTypeValues() []LearnedType
PossibleLearnedTypeValues returns the possible values for the LearnedType const type.
type LegacyPeeringsClient ¶
type LegacyPeeringsClient struct {
// contains filtered or unexported fields
}
LegacyPeeringsClient contains the methods for the LegacyPeerings group. Don't use this type directly, use NewLegacyPeeringsClient() instead.
func NewLegacyPeeringsClient ¶
func NewLegacyPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LegacyPeeringsClient, error)
NewLegacyPeeringsClient creates a new instance of LegacyPeeringsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*LegacyPeeringsClient) NewListPager ¶ added in v0.5.0
func (client *LegacyPeeringsClient) NewListPager(peeringLocation string, kind LegacyPeeringsKind, options *LegacyPeeringsClientListOptions) *runtime.Pager[LegacyPeeringsClientListResponse]
NewListPager - Lists all of the legacy peerings under the given subscription matching the specified kind and location. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 peeringLocation - The location of the peering. kind - The kind of the peering. options - LegacyPeeringsClientListOptions contains the optional parameters for the LegacyPeeringsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListLegacyPeerings.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewLegacyPeeringsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager("peeringLocation0", armpeering.LegacyPeeringsKindExchange, &armpeering.LegacyPeeringsClientListOptions{Asn: 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 LegacyPeeringsClientListOptions ¶ added in v0.2.0
type LegacyPeeringsClientListOptions struct { // The ASN number associated with a legacy peering. Asn *int32 }
LegacyPeeringsClientListOptions contains the optional parameters for the LegacyPeeringsClient.List method.
type LegacyPeeringsClientListResponse ¶ added in v0.2.0
type LegacyPeeringsClientListResponse struct {
ListResult
}
LegacyPeeringsClientListResponse contains the response from method LegacyPeeringsClient.List.
type LegacyPeeringsKind ¶ added in v0.3.0
type LegacyPeeringsKind string
const ( LegacyPeeringsKindDirect LegacyPeeringsKind = "Direct" LegacyPeeringsKindExchange LegacyPeeringsKind = "Exchange" )
func PossibleLegacyPeeringsKindValues ¶ added in v0.3.0
func PossibleLegacyPeeringsKindValues() []LegacyPeeringsKind
PossibleLegacyPeeringsKindValues returns the possible values for the LegacyPeeringsKind const type.
type ListResult ¶ added in v0.2.0
type ListResult struct { // The link to fetch the next page of peerings. NextLink *string `json:"nextLink,omitempty"` // The list of peerings. Value []*Peering `json:"value,omitempty"` }
ListResult - The paginated list of peerings.
type Location ¶ added in v0.2.0
type Location struct { // The kind of peering that the peering location supports. Kind *Kind `json:"kind,omitempty"` // The properties that define a peering location. Properties *LocationProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
Location - Peering location is where connectivity could be established to the Microsoft Cloud Edge.
type LocationListResult ¶ added in v0.2.0
type LocationListResult struct { // The link to fetch the next page of peering locations. NextLink *string `json:"nextLink,omitempty"` // The list of peering locations. Value []*Location `json:"value,omitempty"` }
LocationListResult - The paginated list of peering locations.
type LocationProperties ¶ added in v0.2.0
type LocationProperties struct { // The Azure region associated with the peering location. AzureRegion *string `json:"azureRegion,omitempty"` // The country in which the peering location exists. Country *string `json:"country,omitempty"` // The properties that define a direct peering location. Direct *LocationPropertiesDirect `json:"direct,omitempty"` // The properties that define an exchange peering location. Exchange *LocationPropertiesExchange `json:"exchange,omitempty"` // The name of the peering location. PeeringLocation *string `json:"peeringLocation,omitempty"` }
LocationProperties - The properties that define a peering location.
type LocationPropertiesDirect ¶ added in v0.2.0
type LocationPropertiesDirect struct { // The list of bandwidth offers available at the peering location. BandwidthOffers []*BandwidthOffer `json:"bandwidthOffers,omitempty"` // The list of direct peering facilities at the peering location. PeeringFacilities []*DirectPeeringFacility `json:"peeringFacilities,omitempty"` }
LocationPropertiesDirect - The properties that define a direct peering location.
func (LocationPropertiesDirect) MarshalJSON ¶ added in v0.2.0
func (l LocationPropertiesDirect) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationPropertiesDirect.
type LocationPropertiesExchange ¶ added in v0.2.0
type LocationPropertiesExchange struct { // The list of exchange peering facilities at the peering location. PeeringFacilities []*ExchangePeeringFacility `json:"peeringFacilities,omitempty"` }
LocationPropertiesExchange - The properties that define an exchange peering location.
func (LocationPropertiesExchange) MarshalJSON ¶ added in v0.2.0
func (l LocationPropertiesExchange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LocationPropertiesExchange.
type LocationsClient ¶ added in v0.2.0
type LocationsClient struct {
// contains filtered or unexported fields
}
LocationsClient contains the methods for the PeeringLocations group. Don't use this type directly, use NewLocationsClient() instead.
func NewLocationsClient ¶ added in v0.2.0
func NewLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LocationsClient, error)
NewLocationsClient creates a new instance of LocationsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*LocationsClient) NewListPager ¶ added in v0.5.0
func (client *LocationsClient) NewListPager(kind PeeringLocationsKind, options *LocationsClientListOptions) *runtime.Pager[LocationsClientListResponse]
NewListPager - Lists all of the available peering locations for the specified kind of peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 kind - The kind of the peering. options - LocationsClientListOptions contains the optional parameters for the LocationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListDirectPeeringLocations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewLocationsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(armpeering.PeeringLocationsKindDirect, &armpeering.LocationsClientListOptions{DirectPeeringType: 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 LocationsClientListOptions ¶ added in v0.2.0
type LocationsClientListOptions struct { // The type of direct peering. DirectPeeringType *PeeringLocationsDirectPeeringType }
LocationsClientListOptions contains the optional parameters for the LocationsClient.List method.
type LocationsClientListResponse ¶ added in v0.2.0
type LocationsClientListResponse struct {
LocationListResult
}
LocationsClientListResponse contains the response from method LocationsClient.List.
type LogAnalyticsWorkspaceProperties ¶ added in v0.3.0
type LogAnalyticsWorkspaceProperties struct { // READ-ONLY; The list of connected agents. ConnectedAgents []*string `json:"connectedAgents,omitempty" azure:"ro"` // READ-ONLY; The Workspace Key. Key *string `json:"key,omitempty" azure:"ro"` // READ-ONLY; The Workspace ID. WorkspaceID *string `json:"workspaceID,omitempty" azure:"ro"` }
LogAnalyticsWorkspaceProperties - The properties that define a Log Analytics Workspace.
func (LogAnalyticsWorkspaceProperties) MarshalJSON ¶ added in v0.3.0
func (l LogAnalyticsWorkspaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type LogAnalyticsWorkspaceProperties.
type LookingGlassClient ¶ added in v0.3.0
type LookingGlassClient struct {
// contains filtered or unexported fields
}
LookingGlassClient contains the methods for the LookingGlass group. Don't use this type directly, use NewLookingGlassClient() instead.
func NewLookingGlassClient ¶ added in v0.3.0
func NewLookingGlassClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LookingGlassClient, error)
NewLookingGlassClient creates a new instance of LookingGlassClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*LookingGlassClient) Invoke ¶ added in v0.3.0
func (client *LookingGlassClient) Invoke(ctx context.Context, command LookingGlassCommand, sourceType LookingGlassSourceType, sourceLocation string, destinationIP string, options *LookingGlassClientInvokeOptions) (LookingGlassClientInvokeResponse, error)
Invoke - Run looking glass functionality If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 command - The command to be executed: ping, traceroute, bgpRoute. sourceType - The type of the source: Edge site or Azure Region. sourceLocation - The location of the source. destinationIP - The IP address of the destination. options - LookingGlassClientInvokeOptions contains the optional parameters for the LookingGlassClient.Invoke method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/LookingGlassInvokeCommand.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewLookingGlassClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Invoke(ctx, armpeering.LookingGlassCommandTraceroute, armpeering.LookingGlassSourceTypeAzureRegion, "West US", "0.0.0.0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type LookingGlassClientInvokeOptions ¶ added in v0.3.0
type LookingGlassClientInvokeOptions struct { }
LookingGlassClientInvokeOptions contains the optional parameters for the LookingGlassClient.Invoke method.
type LookingGlassClientInvokeResponse ¶ added in v0.3.0
type LookingGlassClientInvokeResponse struct {
LookingGlassOutput
}
LookingGlassClientInvokeResponse contains the response from method LookingGlassClient.Invoke.
type LookingGlassCommand ¶ added in v0.3.0
type LookingGlassCommand string
const ( LookingGlassCommandBgpRoute LookingGlassCommand = "BgpRoute" LookingGlassCommandPing LookingGlassCommand = "Ping" LookingGlassCommandTraceroute LookingGlassCommand = "Traceroute" )
func PossibleLookingGlassCommandValues ¶ added in v0.3.0
func PossibleLookingGlassCommandValues() []LookingGlassCommand
PossibleLookingGlassCommandValues returns the possible values for the LookingGlassCommand const type.
type LookingGlassOutput ¶ added in v0.3.0
type LookingGlassOutput struct { // Invoked command Command *Command `json:"command,omitempty"` // Output of the command Output *string `json:"output,omitempty"` }
LookingGlassOutput - Looking glass output model
type LookingGlassSourceType ¶ added in v0.3.0
type LookingGlassSourceType string
const ( LookingGlassSourceTypeAzureRegion LookingGlassSourceType = "AzureRegion" LookingGlassSourceTypeEdgeSite LookingGlassSourceType = "EdgeSite" )
func PossibleLookingGlassSourceTypeValues ¶ added in v0.3.0
func PossibleLookingGlassSourceTypeValues() []LookingGlassSourceType
PossibleLookingGlassSourceTypeValues returns the possible values for the LookingGlassSourceType const type.
type ManagementClient ¶ added in v0.2.0
type ManagementClient struct {
// contains filtered or unexported fields
}
ManagementClient contains the methods for the PeeringManagementClient group. Don't use this type directly, use NewManagementClient() instead.
func NewManagementClient ¶ added in v0.2.0
func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error)
NewManagementClient creates a new instance of ManagementClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ManagementClient) CheckServiceProviderAvailability ¶ added in v0.2.0
func (client *ManagementClient) CheckServiceProviderAvailability(ctx context.Context, checkServiceProviderAvailabilityInput CheckServiceProviderAvailabilityInput, options *ManagementClientCheckServiceProviderAvailabilityOptions) (ManagementClientCheckServiceProviderAvailabilityResponse, error)
CheckServiceProviderAvailability - Checks if the peering service provider is present within 1000 miles of customer's location If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 checkServiceProviderAvailabilityInput - The CheckServiceProviderAvailabilityInput indicating customer location and service provider. options - ManagementClientCheckServiceProviderAvailabilityOptions contains the optional parameters for the ManagementClient.CheckServiceProviderAvailability method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CheckServiceProviderAvailability.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewManagementClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CheckServiceProviderAvailability(ctx, armpeering.CheckServiceProviderAvailabilityInput{ PeeringServiceLocation: to.Ptr("peeringServiceLocation1"), PeeringServiceProvider: to.Ptr("peeringServiceProvider1"), }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ManagementClientCheckServiceProviderAvailabilityOptions ¶ added in v0.2.0
type ManagementClientCheckServiceProviderAvailabilityOptions struct { }
ManagementClientCheckServiceProviderAvailabilityOptions contains the optional parameters for the ManagementClient.CheckServiceProviderAvailability method.
type ManagementClientCheckServiceProviderAvailabilityResponse ¶ added in v0.2.0
type ManagementClientCheckServiceProviderAvailabilityResponse struct {
Value *Enum0
}
ManagementClientCheckServiceProviderAvailabilityResponse contains the response from method ManagementClient.CheckServiceProviderAvailability.
type MetricDimension ¶ added in v0.3.0
type MetricDimension struct { // READ-ONLY; Localized friendly display name of the dimension. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; Name of the dimension. Name *string `json:"name,omitempty" azure:"ro"` }
MetricDimension - Dimensions of the metric.
type MetricSpecification ¶ added in v0.3.0
type MetricSpecification struct { // READ-ONLY; Aggregation type will be set to one of the values: Average, Minimum, Maximum, Total, Count. AggregationType *string `json:"aggregationType,omitempty" azure:"ro"` // READ-ONLY; Dimensions of the metric. Dimensions []*MetricDimension `json:"dimensions,omitempty" azure:"ro"` // READ-ONLY; Localized friendly description of the metric. DisplayDescription *string `json:"displayDescription,omitempty" azure:"ro"` // READ-ONLY; Localized friendly display name of the metric. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; Name of the metric. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; Supported time grain types for the metric. SupportedTimeGrainTypes []*string `json:"supportedTimeGrainTypes,omitempty" azure:"ro"` // READ-ONLY; Unit that makes sense for the metric. Unit *string `json:"unit,omitempty" azure:"ro"` }
MetricSpecification - Specifications of the Metrics for Azure Monitoring.
type Operation ¶
type Operation struct { // READ-ONLY; The information related to the operation. Display *OperationDisplayInfo `json:"display,omitempty" azure:"ro"` // READ-ONLY; The flag that indicates whether the operation applies to data plane. IsDataAction *bool `json:"isDataAction,omitempty" azure:"ro"` // READ-ONLY; The name of the operation. Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The properties of the operation. Properties *OperationProperties `json:"properties,omitempty" azure:"ro"` }
Operation - The peering API operation.
type OperationDisplayInfo ¶
type OperationDisplayInfo struct { // READ-ONLY; The description of the operation. Description *string `json:"description,omitempty" azure:"ro"` // READ-ONLY; The name of the operation. Operation *string `json:"operation,omitempty" azure:"ro"` // READ-ONLY; The name of the resource provider. Provider *string `json:"provider,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. Resource *string `json:"resource,omitempty" azure:"ro"` }
OperationDisplayInfo - The information related to the operation.
type OperationListResult ¶
type OperationListResult struct { // The link to fetch the next page of peering API operations. NextLink *string `json:"nextLink,omitempty"` // The list of peering API operations. Value []*Operation `json:"value,omitempty"` }
OperationListResult - The paginated list of peering API operations.
type OperationProperties ¶ added in v0.3.0
type OperationProperties struct { // READ-ONLY; Service specification payload. ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty" azure:"ro"` }
OperationProperties - The properties of the operation.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*OperationsClient) NewListPager ¶ added in v0.5.0
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available API operations for peering resources. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(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 OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct {
OperationListResult
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type PeerAsn ¶
type PeerAsn struct { // The properties that define a peer's ASN. Properties *PeerAsnProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
PeerAsn - The essential information related to the peer's ASN.
type PeerAsnListResult ¶
type PeerAsnListResult struct { // The link to fetch the next page of peer ASNs. NextLink *string `json:"nextLink,omitempty"` // The list of peer ASNs. Value []*PeerAsn `json:"value,omitempty"` }
PeerAsnListResult - The paginated list of peer ASNs.
type PeerAsnProperties ¶
type PeerAsnProperties struct { // The Autonomous System Number (ASN) of the peer. PeerAsn *int32 `json:"peerAsn,omitempty"` // The contact details of the peer. PeerContactDetail []*ContactDetail `json:"peerContactDetail,omitempty"` // The name of the peer. PeerName *string `json:"peerName,omitempty"` // READ-ONLY; The error message for the validation state ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; The validation state of the ASN associated with the peer. ValidationState *ValidationState `json:"validationState,omitempty" azure:"ro"` }
PeerAsnProperties - The properties that define a peer's ASN.
func (PeerAsnProperties) MarshalJSON ¶ added in v0.3.0
func (p PeerAsnProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PeerAsnProperties.
type PeerAsnsClient ¶
type PeerAsnsClient struct {
// contains filtered or unexported fields
}
PeerAsnsClient contains the methods for the PeerAsns group. Don't use this type directly, use NewPeerAsnsClient() instead.
func NewPeerAsnsClient ¶
func NewPeerAsnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeerAsnsClient, error)
NewPeerAsnsClient creates a new instance of PeerAsnsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PeerAsnsClient) CreateOrUpdate ¶
func (client *PeerAsnsClient) CreateOrUpdate(ctx context.Context, peerAsnName string, peerAsn PeerAsn, options *PeerAsnsClientCreateOrUpdateOptions) (PeerAsnsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a new peer ASN or updates an existing peer ASN with the specified name under the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 peerAsnName - The peer ASN name. peerAsn - The peer ASN. options - PeerAsnsClientCreateOrUpdateOptions contains the optional parameters for the PeerAsnsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CreatePeerAsn.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeerAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "peerAsnName", armpeering.PeerAsn{ Properties: &armpeering.PeerAsnProperties{ PeerAsn: to.Ptr[int32](65000), PeerContactDetail: []*armpeering.ContactDetail{ { Email: to.Ptr("noc@contoso.com"), Phone: to.Ptr("+1 (234) 567-8999"), Role: to.Ptr(armpeering.RoleNoc), }, { Email: to.Ptr("abc@contoso.com"), Phone: to.Ptr("+1 (234) 567-8900"), Role: to.Ptr(armpeering.RolePolicy), }, { Email: to.Ptr("xyz@contoso.com"), Phone: to.Ptr("+1 (234) 567-8900"), Role: to.Ptr(armpeering.RoleTechnical), }}, PeerName: to.Ptr("Contoso"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PeerAsnsClient) Delete ¶
func (client *PeerAsnsClient) Delete(ctx context.Context, peerAsnName string, options *PeerAsnsClientDeleteOptions) (PeerAsnsClientDeleteResponse, error)
Delete - Deletes an existing peer ASN with the specified name under the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 peerAsnName - The peer ASN name. options - PeerAsnsClientDeleteOptions contains the optional parameters for the PeerAsnsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/DeletePeerAsn.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeerAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "peerAsnName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*PeerAsnsClient) Get ¶
func (client *PeerAsnsClient) Get(ctx context.Context, peerAsnName string, options *PeerAsnsClientGetOptions) (PeerAsnsClientGetResponse, error)
Get - Gets the peer ASN with the specified name under the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 peerAsnName - The peer ASN name. options - PeerAsnsClientGetOptions contains the optional parameters for the PeerAsnsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetPeerAsn.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeerAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "peerAsnName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PeerAsnsClient) NewListBySubscriptionPager ¶ added in v0.5.0
func (client *PeerAsnsClient) NewListBySubscriptionPager(options *PeerAsnsClientListBySubscriptionOptions) *runtime.Pager[PeerAsnsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Lists all of the peer ASNs under the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - PeerAsnsClientListBySubscriptionOptions contains the optional parameters for the PeerAsnsClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeerAsnsBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeerAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(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 PeerAsnsClientCreateOrUpdateOptions ¶ added in v0.2.0
type PeerAsnsClientCreateOrUpdateOptions struct { }
PeerAsnsClientCreateOrUpdateOptions contains the optional parameters for the PeerAsnsClient.CreateOrUpdate method.
type PeerAsnsClientCreateOrUpdateResponse ¶ added in v0.2.0
type PeerAsnsClientCreateOrUpdateResponse struct {
PeerAsn
}
PeerAsnsClientCreateOrUpdateResponse contains the response from method PeerAsnsClient.CreateOrUpdate.
type PeerAsnsClientDeleteOptions ¶ added in v0.2.0
type PeerAsnsClientDeleteOptions struct { }
PeerAsnsClientDeleteOptions contains the optional parameters for the PeerAsnsClient.Delete method.
type PeerAsnsClientDeleteResponse ¶ added in v0.2.0
type PeerAsnsClientDeleteResponse struct { }
PeerAsnsClientDeleteResponse contains the response from method PeerAsnsClient.Delete.
type PeerAsnsClientGetOptions ¶ added in v0.2.0
type PeerAsnsClientGetOptions struct { }
PeerAsnsClientGetOptions contains the optional parameters for the PeerAsnsClient.Get method.
type PeerAsnsClientGetResponse ¶ added in v0.2.0
type PeerAsnsClientGetResponse struct {
PeerAsn
}
PeerAsnsClientGetResponse contains the response from method PeerAsnsClient.Get.
type PeerAsnsClientListBySubscriptionOptions ¶ added in v0.2.0
type PeerAsnsClientListBySubscriptionOptions struct { }
PeerAsnsClientListBySubscriptionOptions contains the optional parameters for the PeerAsnsClient.ListBySubscription method.
type PeerAsnsClientListBySubscriptionResponse ¶ added in v0.2.0
type PeerAsnsClientListBySubscriptionResponse struct {
PeerAsnListResult
}
PeerAsnsClientListBySubscriptionResponse contains the response from method PeerAsnsClient.ListBySubscription.
type Peering ¶
type Peering struct { // REQUIRED; The kind of the peering. Kind *Kind `json:"kind,omitempty"` // REQUIRED; The location of the resource. Location *string `json:"location,omitempty"` // REQUIRED; The SKU that defines the tier and kind of the peering. SKU *SKU `json:"sku,omitempty"` // The properties that define a peering. Properties *Properties `json:"properties,omitempty"` // The resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
Peering is a logical representation of a set of connections to the Microsoft Cloud Edge at a location.
func (Peering) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Peering.
type PeeringLocationsDirectPeeringType ¶ added in v0.3.0
type PeeringLocationsDirectPeeringType string
const ( PeeringLocationsDirectPeeringTypeCdn PeeringLocationsDirectPeeringType = "Cdn" PeeringLocationsDirectPeeringTypeEdge PeeringLocationsDirectPeeringType = "Edge" PeeringLocationsDirectPeeringTypeEdgeZoneForOperators PeeringLocationsDirectPeeringType = "EdgeZoneForOperators" PeeringLocationsDirectPeeringTypeInternal PeeringLocationsDirectPeeringType = "Internal" PeeringLocationsDirectPeeringTypeIx PeeringLocationsDirectPeeringType = "Ix" PeeringLocationsDirectPeeringTypeIxRs PeeringLocationsDirectPeeringType = "IxRs" PeeringLocationsDirectPeeringTypeTransit PeeringLocationsDirectPeeringType = "Transit" PeeringLocationsDirectPeeringTypeVoice PeeringLocationsDirectPeeringType = "Voice" )
func PossiblePeeringLocationsDirectPeeringTypeValues ¶ added in v0.3.0
func PossiblePeeringLocationsDirectPeeringTypeValues() []PeeringLocationsDirectPeeringType
PossiblePeeringLocationsDirectPeeringTypeValues returns the possible values for the PeeringLocationsDirectPeeringType const type.
type PeeringLocationsKind ¶ added in v0.3.0
type PeeringLocationsKind string
const ( PeeringLocationsKindDirect PeeringLocationsKind = "Direct" PeeringLocationsKindExchange PeeringLocationsKind = "Exchange" )
func PossiblePeeringLocationsKindValues ¶ added in v0.3.0
func PossiblePeeringLocationsKindValues() []PeeringLocationsKind
PossiblePeeringLocationsKindValues returns the possible values for the PeeringLocationsKind const type.
type PeeringsClient ¶
type PeeringsClient struct {
// contains filtered or unexported fields
}
PeeringsClient contains the methods for the Peerings group. Don't use this type directly, use NewPeeringsClient() instead.
func NewPeeringsClient ¶
func NewPeeringsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeeringsClient, error)
NewPeeringsClient creates a new instance of PeeringsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PeeringsClient) CreateOrUpdate ¶
func (client *PeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringName string, peering Peering, options *PeeringsClientCreateOrUpdateOptions) (PeeringsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a new peering or updates an existing peering with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. peering - The properties needed to create or update a peering. options - PeeringsClientCreateOrUpdateOptions contains the optional parameters for the PeeringsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CreateDirectPeering.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeeringsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "rgName", "peeringName", armpeering.Peering{ Kind: to.Ptr(armpeering.KindDirect), Location: to.Ptr("eastus"), Properties: &armpeering.Properties{ Direct: &armpeering.PropertiesDirect{ Connections: []*armpeering.DirectConnection{ { BandwidthInMbps: to.Ptr[int32](10000), BgpSession: &armpeering.BgpSession{ MaxPrefixesAdvertisedV4: to.Ptr[int32](1000), MaxPrefixesAdvertisedV6: to.Ptr[int32](100), MD5AuthenticationKey: to.Ptr("test-md5-auth-key"), SessionPrefixV4: to.Ptr("192.168.0.0/31"), SessionPrefixV6: to.Ptr("fd00::0/127"), }, ConnectionIdentifier: to.Ptr("5F4CB5C7-6B43-4444-9338-9ABC72606C16"), PeeringDBFacilityID: to.Ptr[int32](99999), SessionAddressProvider: to.Ptr(armpeering.SessionAddressProviderPeer), UseForPeeringService: to.Ptr(false), }, { BandwidthInMbps: to.Ptr[int32](10000), ConnectionIdentifier: to.Ptr("8AB00818-D533-4504-A25A-03A17F61201C"), PeeringDBFacilityID: to.Ptr[int32](99999), SessionAddressProvider: to.Ptr(armpeering.SessionAddressProviderMicrosoft), UseForPeeringService: to.Ptr(true), }}, DirectPeeringType: to.Ptr(armpeering.DirectPeeringTypeEdge), PeerAsn: &armpeering.SubResource{ ID: to.Ptr("/subscriptions/subId/providers/Microsoft.Peering/peerAsns/myAsn1"), }, }, PeeringLocation: to.Ptr("peeringLocation0"), }, SKU: &armpeering.SKU{ Name: to.Ptr("Basic_Direct_Free"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PeeringsClient) Delete ¶
func (client *PeeringsClient) Delete(ctx context.Context, resourceGroupName string, peeringName string, options *PeeringsClientDeleteOptions) (PeeringsClientDeleteResponse, error)
Delete - Deletes an existing peering with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. options - PeeringsClientDeleteOptions contains the optional parameters for the PeeringsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/DeletePeering.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeeringsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "rgName", "peeringName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*PeeringsClient) Get ¶
func (client *PeeringsClient) Get(ctx context.Context, resourceGroupName string, peeringName string, options *PeeringsClientGetOptions) (PeeringsClientGetResponse, error)
Get - Gets an existing peering with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. options - PeeringsClientGetOptions contains the optional parameters for the PeeringsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetPeering.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeeringsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rgName", "peeringName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PeeringsClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *PeeringsClient) NewListByResourceGroupPager(resourceGroupName string, options *PeeringsClientListByResourceGroupOptions) *runtime.Pager[PeeringsClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists all of the peerings under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. options - PeeringsClientListByResourceGroupOptions contains the optional parameters for the PeeringsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringsByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeeringsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("rgName", 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 (*PeeringsClient) NewListBySubscriptionPager ¶ added in v0.5.0
func (client *PeeringsClient) NewListBySubscriptionPager(options *PeeringsClientListBySubscriptionOptions) *runtime.Pager[PeeringsClientListBySubscriptionResponse]
NewListBySubscriptionPager - Lists all of the peerings under the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - PeeringsClientListBySubscriptionOptions contains the optional parameters for the PeeringsClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringsBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeeringsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(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 (*PeeringsClient) Update ¶
func (client *PeeringsClient) Update(ctx context.Context, resourceGroupName string, peeringName string, tags ResourceTags, options *PeeringsClientUpdateOptions) (PeeringsClientUpdateResponse, error)
Update - Updates tags for a peering with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. tags - The resource tags. options - PeeringsClientUpdateOptions contains the optional parameters for the PeeringsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/UpdatePeeringTags.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPeeringsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "rgName", "peeringName", armpeering.ResourceTags{ Tags: map[string]*string{ "tag0": to.Ptr("value0"), "tag1": to.Ptr("value1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type PeeringsClientCreateOrUpdateOptions ¶ added in v0.2.0
type PeeringsClientCreateOrUpdateOptions struct { }
PeeringsClientCreateOrUpdateOptions contains the optional parameters for the PeeringsClient.CreateOrUpdate method.
type PeeringsClientCreateOrUpdateResponse ¶ added in v0.2.0
type PeeringsClientCreateOrUpdateResponse struct {
Peering
}
PeeringsClientCreateOrUpdateResponse contains the response from method PeeringsClient.CreateOrUpdate.
type PeeringsClientDeleteOptions ¶ added in v0.2.0
type PeeringsClientDeleteOptions struct { }
PeeringsClientDeleteOptions contains the optional parameters for the PeeringsClient.Delete method.
type PeeringsClientDeleteResponse ¶ added in v0.2.0
type PeeringsClientDeleteResponse struct { }
PeeringsClientDeleteResponse contains the response from method PeeringsClient.Delete.
type PeeringsClientGetOptions ¶ added in v0.2.0
type PeeringsClientGetOptions struct { }
PeeringsClientGetOptions contains the optional parameters for the PeeringsClient.Get method.
type PeeringsClientGetResponse ¶ added in v0.2.0
type PeeringsClientGetResponse struct {
Peering
}
PeeringsClientGetResponse contains the response from method PeeringsClient.Get.
type PeeringsClientListByResourceGroupOptions ¶ added in v0.2.0
type PeeringsClientListByResourceGroupOptions struct { }
PeeringsClientListByResourceGroupOptions contains the optional parameters for the PeeringsClient.ListByResourceGroup method.
type PeeringsClientListByResourceGroupResponse ¶ added in v0.2.0
type PeeringsClientListByResourceGroupResponse struct {
ListResult
}
PeeringsClientListByResourceGroupResponse contains the response from method PeeringsClient.ListByResourceGroup.
type PeeringsClientListBySubscriptionOptions ¶ added in v0.2.0
type PeeringsClientListBySubscriptionOptions struct { }
PeeringsClientListBySubscriptionOptions contains the optional parameters for the PeeringsClient.ListBySubscription method.
type PeeringsClientListBySubscriptionResponse ¶ added in v0.2.0
type PeeringsClientListBySubscriptionResponse struct {
ListResult
}
PeeringsClientListBySubscriptionResponse contains the response from method PeeringsClient.ListBySubscription.
type PeeringsClientUpdateOptions ¶ added in v0.2.0
type PeeringsClientUpdateOptions struct { }
PeeringsClientUpdateOptions contains the optional parameters for the PeeringsClient.Update method.
type PeeringsClientUpdateResponse ¶ added in v0.2.0
type PeeringsClientUpdateResponse struct {
Peering
}
PeeringsClientUpdateResponse contains the response from method PeeringsClient.Update.
type PrefixValidationState ¶
type PrefixValidationState string
PrefixValidationState - The prefix validation state.
const ( PrefixValidationStateFailed PrefixValidationState = "Failed" PrefixValidationStateInvalid PrefixValidationState = "Invalid" PrefixValidationStateNone PrefixValidationState = "None" PrefixValidationStatePending PrefixValidationState = "Pending" PrefixValidationStateUnknown PrefixValidationState = "Unknown" PrefixValidationStateVerified PrefixValidationState = "Verified" PrefixValidationStateWarning PrefixValidationState = "Warning" )
func PossiblePrefixValidationStateValues ¶
func PossiblePrefixValidationStateValues() []PrefixValidationState
PossiblePrefixValidationStateValues returns the possible values for the PrefixValidationState const type.
type PrefixesClient ¶
type PrefixesClient struct {
// contains filtered or unexported fields
}
PrefixesClient contains the methods for the Prefixes group. Don't use this type directly, use NewPrefixesClient() instead.
func NewPrefixesClient ¶
func NewPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrefixesClient, error)
NewPrefixesClient creates a new instance of PrefixesClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*PrefixesClient) CreateOrUpdate ¶ added in v0.3.0
func (client *PrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringServiceName string, prefixName string, peeringServicePrefix ServicePrefix, options *PrefixesClientCreateOrUpdateOptions) (PrefixesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a new prefix with the specified name under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. prefixName - The name of the prefix. peeringServicePrefix - The properties needed to create a prefix. options - PrefixesClientCreateOrUpdateOptions contains the optional parameters for the PrefixesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CreatePeeringServicePrefix.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "rgName", "peeringServiceName", "peeringServicePrefixName", armpeering.ServicePrefix{ Properties: &armpeering.ServicePrefixProperties{ PeeringServicePrefixKey: to.Ptr("00000000-0000-0000-0000-000000000000"), Prefix: to.Ptr("192.168.1.0/24"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PrefixesClient) Delete ¶ added in v0.3.0
func (client *PrefixesClient) Delete(ctx context.Context, resourceGroupName string, peeringServiceName string, prefixName string, options *PrefixesClientDeleteOptions) (PrefixesClientDeleteResponse, error)
Delete - Deletes an existing prefix with the specified name under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. prefixName - The name of the prefix. options - PrefixesClientDeleteOptions contains the optional parameters for the PrefixesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/DeletePeeringServicePrefix.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "rgName", "peeringServiceName", "peeringServicePrefixName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*PrefixesClient) Get ¶ added in v0.3.0
func (client *PrefixesClient) Get(ctx context.Context, resourceGroupName string, peeringServiceName string, prefixName string, options *PrefixesClientGetOptions) (PrefixesClientGetResponse, error)
Get - Gets an existing prefix with the specified name under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. prefixName - The name of the prefix. options - PrefixesClientGetOptions contains the optional parameters for the PrefixesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetPeeringServicePrefix.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rgName", "peeringServiceName", "peeringServicePrefixName", &armpeering.PrefixesClientGetOptions{Expand: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*PrefixesClient) NewListByPeeringServicePager ¶ added in v0.5.0
func (client *PrefixesClient) NewListByPeeringServicePager(resourceGroupName string, peeringServiceName string, options *PrefixesClientListByPeeringServiceOptions) *runtime.Pager[PrefixesClientListByPeeringServiceResponse]
NewListByPeeringServicePager - Lists all prefixes under the given subscription, resource group and peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. options - PrefixesClientListByPeeringServiceOptions contains the optional parameters for the PrefixesClient.ListByPeeringService method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPrefixesByPeeringService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByPeeringServicePager("rgName", "peeringServiceName", &armpeering.PrefixesClientListByPeeringServiceOptions{Expand: 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 PrefixesClientCreateOrUpdateOptions ¶ added in v0.3.0
type PrefixesClientCreateOrUpdateOptions struct { }
PrefixesClientCreateOrUpdateOptions contains the optional parameters for the PrefixesClient.CreateOrUpdate method.
type PrefixesClientCreateOrUpdateResponse ¶ added in v0.3.0
type PrefixesClientCreateOrUpdateResponse struct {
ServicePrefix
}
PrefixesClientCreateOrUpdateResponse contains the response from method PrefixesClient.CreateOrUpdate.
type PrefixesClientDeleteOptions ¶ added in v0.3.0
type PrefixesClientDeleteOptions struct { }
PrefixesClientDeleteOptions contains the optional parameters for the PrefixesClient.Delete method.
type PrefixesClientDeleteResponse ¶ added in v0.3.0
type PrefixesClientDeleteResponse struct { }
PrefixesClientDeleteResponse contains the response from method PrefixesClient.Delete.
type PrefixesClientGetOptions ¶ added in v0.3.0
type PrefixesClientGetOptions struct { // The properties to be expanded. Expand *string }
PrefixesClientGetOptions contains the optional parameters for the PrefixesClient.Get method.
type PrefixesClientGetResponse ¶ added in v0.3.0
type PrefixesClientGetResponse struct {
ServicePrefix
}
PrefixesClientGetResponse contains the response from method PrefixesClient.Get.
type PrefixesClientListByPeeringServiceOptions ¶ added in v0.2.0
type PrefixesClientListByPeeringServiceOptions struct { // The properties to be expanded. Expand *string }
PrefixesClientListByPeeringServiceOptions contains the optional parameters for the PrefixesClient.ListByPeeringService method.
type PrefixesClientListByPeeringServiceResponse ¶ added in v0.2.0
type PrefixesClientListByPeeringServiceResponse struct {
ServicePrefixListResult
}
PrefixesClientListByPeeringServiceResponse contains the response from method PrefixesClient.ListByPeeringService.
type Properties ¶ added in v0.2.0
type Properties struct { // The properties that define a direct peering. Direct *PropertiesDirect `json:"direct,omitempty"` // The properties that define an exchange peering. Exchange *PropertiesExchange `json:"exchange,omitempty"` // The location of the peering. PeeringLocation *string `json:"peeringLocation,omitempty"` // READ-ONLY; The provisioning state of the resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
Properties - The properties that define connectivity to the Microsoft Cloud Edge.
type PropertiesDirect ¶ added in v0.2.0
type PropertiesDirect struct { // The set of connections that constitute a direct peering. Connections []*DirectConnection `json:"connections,omitempty"` // The type of direct peering. DirectPeeringType *DirectPeeringType `json:"directPeeringType,omitempty"` // The reference of the peer ASN. PeerAsn *SubResource `json:"peerAsn,omitempty"` // READ-ONLY; The flag that indicates whether or not the peering is used for peering service. UseForPeeringService *bool `json:"useForPeeringService,omitempty" azure:"ro"` }
PropertiesDirect - The properties that define a direct peering.
func (PropertiesDirect) MarshalJSON ¶ added in v0.2.0
func (p PropertiesDirect) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PropertiesDirect.
type PropertiesExchange ¶ added in v0.2.0
type PropertiesExchange struct { // The set of connections that constitute an exchange peering. Connections []*ExchangeConnection `json:"connections,omitempty"` // The reference of the peer ASN. PeerAsn *SubResource `json:"peerAsn,omitempty"` }
PropertiesExchange - The properties that define an exchange peering.
func (PropertiesExchange) MarshalJSON ¶ added in v0.2.0
func (p PropertiesExchange) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PropertiesExchange.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - The provisioning state of the resource.
const ( 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 ReceivedRoute ¶ added in v0.3.0
type ReceivedRoute struct { // READ-ONLY; The AS path for the prefix. AsPath *string `json:"asPath,omitempty" azure:"ro"` // READ-ONLY; The next hop for the prefix. NextHop *string `json:"nextHop,omitempty" azure:"ro"` // READ-ONLY; The origin AS change information for the prefix. OriginAsValidationState *string `json:"originAsValidationState,omitempty" azure:"ro"` // READ-ONLY; The prefix. Prefix *string `json:"prefix,omitempty" azure:"ro"` // READ-ONLY; The received timestamp associated with the prefix. ReceivedTimestamp *string `json:"receivedTimestamp,omitempty" azure:"ro"` // READ-ONLY; The RPKI validation state for the prefix and origin AS that's listed in the AS path. RpkiValidationState *string `json:"rpkiValidationState,omitempty" azure:"ro"` // READ-ONLY; The authority which holds the Route Origin Authorization record for the prefix, if any. TrustAnchor *string `json:"trustAnchor,omitempty" azure:"ro"` }
ReceivedRoute - The properties that define a received route.
type ReceivedRouteListResult ¶ added in v0.3.0
type ReceivedRouteListResult struct { // The link to fetch the next page of received routes for the peering. NextLink *string `json:"nextLink,omitempty"` // The list of received routes for the peering. Value []*ReceivedRoute `json:"value,omitempty"` }
ReceivedRouteListResult - The paginated list of received routes for the peering.
type ReceivedRoutesClient ¶ added in v0.3.0
type ReceivedRoutesClient struct {
// contains filtered or unexported fields
}
ReceivedRoutesClient contains the methods for the ReceivedRoutes group. Don't use this type directly, use NewReceivedRoutesClient() instead.
func NewReceivedRoutesClient ¶ added in v0.3.0
func NewReceivedRoutesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ReceivedRoutesClient, error)
NewReceivedRoutesClient creates a new instance of ReceivedRoutesClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ReceivedRoutesClient) NewListByPeeringPager ¶ added in v0.5.0
func (client *ReceivedRoutesClient) NewListByPeeringPager(resourceGroupName string, peeringName string, options *ReceivedRoutesClientListByPeeringOptions) *runtime.Pager[ReceivedRoutesClientListByPeeringResponse]
NewListByPeeringPager - Lists the prefixes received over the specified peering under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. options - ReceivedRoutesClientListByPeeringOptions contains the optional parameters for the ReceivedRoutesClient.ListByPeering method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetPeeringReceivedRoutes.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewReceivedRoutesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByPeeringPager("rgName", "peeringName", &armpeering.ReceivedRoutesClientListByPeeringOptions{Prefix: to.Ptr("1.1.1.0/24"), AsPath: to.Ptr("123 456"), OriginAsValidationState: to.Ptr("Valid"), RpkiValidationState: to.Ptr("Valid"), SkipToken: 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 ReceivedRoutesClientListByPeeringOptions ¶ added in v0.3.0
type ReceivedRoutesClientListByPeeringOptions struct { // The optional AS path that can be used to filter the routes. AsPath *string // The optional origin AS validation state that can be used to filter the routes. OriginAsValidationState *string // The optional prefix that can be used to filter the routes. Prefix *string // The optional RPKI validation state that can be used to filter the routes. RpkiValidationState *string // The optional page continuation token that is used in the event of paginated result. SkipToken *string }
ReceivedRoutesClientListByPeeringOptions contains the optional parameters for the ReceivedRoutesClient.ListByPeering method.
type ReceivedRoutesClientListByPeeringResponse ¶ added in v0.3.0
type ReceivedRoutesClientListByPeeringResponse struct {
ReceivedRouteListResult
}
ReceivedRoutesClientListByPeeringResponse contains the response from method ReceivedRoutesClient.ListByPeering.
type RegisteredAsn ¶ added in v0.3.0
type RegisteredAsn struct { // The properties that define a registered ASN. Properties *RegisteredAsnProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
RegisteredAsn - The customer's ASN that is registered by the peering service provider.
type RegisteredAsnListResult ¶ added in v0.3.0
type RegisteredAsnListResult struct { // The link to fetch the next page of peering registered ASNs. NextLink *string `json:"nextLink,omitempty"` // The list of peering registered ASNs. Value []*RegisteredAsn `json:"value,omitempty"` }
RegisteredAsnListResult - The paginated list of peering registered ASNs.
type RegisteredAsnProperties ¶ added in v0.3.0
type RegisteredAsnProperties struct { // The customer's ASN from which traffic originates. Asn *int32 `json:"asn,omitempty"` // READ-ONLY; The peering service prefix key that is to be shared with the customer. PeeringServicePrefixKey *string `json:"peeringServicePrefixKey,omitempty" azure:"ro"` // READ-ONLY; The provisioning state of the resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
RegisteredAsnProperties - The properties that define a registered ASN.
type RegisteredAsnsClient ¶ added in v0.3.0
type RegisteredAsnsClient struct {
// contains filtered or unexported fields
}
RegisteredAsnsClient contains the methods for the RegisteredAsns group. Don't use this type directly, use NewRegisteredAsnsClient() instead.
func NewRegisteredAsnsClient ¶ added in v0.3.0
func NewRegisteredAsnsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegisteredAsnsClient, error)
NewRegisteredAsnsClient creates a new instance of RegisteredAsnsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RegisteredAsnsClient) CreateOrUpdate ¶ added in v0.3.0
func (client *RegisteredAsnsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringName string, registeredAsnName string, registeredAsn RegisteredAsn, options *RegisteredAsnsClientCreateOrUpdateOptions) (RegisteredAsnsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a new registered ASN with the specified name under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. registeredAsnName - The name of the ASN. registeredAsn - The properties needed to create a registered ASN. options - RegisteredAsnsClientCreateOrUpdateOptions contains the optional parameters for the RegisteredAsnsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CreateRegisteredAsn.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "rgName", "peeringName", "registeredAsnName", armpeering.RegisteredAsn{ Properties: &armpeering.RegisteredAsnProperties{ Asn: to.Ptr[int32](65000), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RegisteredAsnsClient) Delete ¶ added in v0.3.0
func (client *RegisteredAsnsClient) Delete(ctx context.Context, resourceGroupName string, peeringName string, registeredAsnName string, options *RegisteredAsnsClientDeleteOptions) (RegisteredAsnsClientDeleteResponse, error)
Delete - Deletes an existing registered ASN with the specified name under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. registeredAsnName - The name of the registered ASN. options - RegisteredAsnsClientDeleteOptions contains the optional parameters for the RegisteredAsnsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/DeleteRegisteredAsn.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "rgName", "peeringName", "registeredAsnName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*RegisteredAsnsClient) Get ¶ added in v0.3.0
func (client *RegisteredAsnsClient) Get(ctx context.Context, resourceGroupName string, peeringName string, registeredAsnName string, options *RegisteredAsnsClientGetOptions) (RegisteredAsnsClientGetResponse, error)
Get - Gets an existing registered ASN with the specified name under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. registeredAsnName - The name of the registered ASN. options - RegisteredAsnsClientGetOptions contains the optional parameters for the RegisteredAsnsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetRegisteredAsn.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rgName", "peeringName", "registeredAsnName0", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RegisteredAsnsClient) NewListByPeeringPager ¶ added in v0.5.0
func (client *RegisteredAsnsClient) NewListByPeeringPager(resourceGroupName string, peeringName string, options *RegisteredAsnsClientListByPeeringOptions) *runtime.Pager[RegisteredAsnsClientListByPeeringResponse]
NewListByPeeringPager - Lists all registered ASNs under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. options - RegisteredAsnsClientListByPeeringOptions contains the optional parameters for the RegisteredAsnsClient.ListByPeering method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListRegisteredAsnsByPeering.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredAsnsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByPeeringPager("rgName", "peeringName", 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 RegisteredAsnsClientCreateOrUpdateOptions ¶ added in v0.3.0
type RegisteredAsnsClientCreateOrUpdateOptions struct { }
RegisteredAsnsClientCreateOrUpdateOptions contains the optional parameters for the RegisteredAsnsClient.CreateOrUpdate method.
type RegisteredAsnsClientCreateOrUpdateResponse ¶ added in v0.3.0
type RegisteredAsnsClientCreateOrUpdateResponse struct {
RegisteredAsn
}
RegisteredAsnsClientCreateOrUpdateResponse contains the response from method RegisteredAsnsClient.CreateOrUpdate.
type RegisteredAsnsClientDeleteOptions ¶ added in v0.3.0
type RegisteredAsnsClientDeleteOptions struct { }
RegisteredAsnsClientDeleteOptions contains the optional parameters for the RegisteredAsnsClient.Delete method.
type RegisteredAsnsClientDeleteResponse ¶ added in v0.3.0
type RegisteredAsnsClientDeleteResponse struct { }
RegisteredAsnsClientDeleteResponse contains the response from method RegisteredAsnsClient.Delete.
type RegisteredAsnsClientGetOptions ¶ added in v0.3.0
type RegisteredAsnsClientGetOptions struct { }
RegisteredAsnsClientGetOptions contains the optional parameters for the RegisteredAsnsClient.Get method.
type RegisteredAsnsClientGetResponse ¶ added in v0.3.0
type RegisteredAsnsClientGetResponse struct {
RegisteredAsn
}
RegisteredAsnsClientGetResponse contains the response from method RegisteredAsnsClient.Get.
type RegisteredAsnsClientListByPeeringOptions ¶ added in v0.3.0
type RegisteredAsnsClientListByPeeringOptions struct { }
RegisteredAsnsClientListByPeeringOptions contains the optional parameters for the RegisteredAsnsClient.ListByPeering method.
type RegisteredAsnsClientListByPeeringResponse ¶ added in v0.3.0
type RegisteredAsnsClientListByPeeringResponse struct {
RegisteredAsnListResult
}
RegisteredAsnsClientListByPeeringResponse contains the response from method RegisteredAsnsClient.ListByPeering.
type RegisteredPrefix ¶ added in v0.3.0
type RegisteredPrefix struct { // The properties that define a registered prefix. Properties *RegisteredPrefixProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
RegisteredPrefix - The customer's prefix that is registered by the peering service provider.
type RegisteredPrefixListResult ¶ added in v0.3.0
type RegisteredPrefixListResult struct { // The link to fetch the next page of peering registered prefixes. NextLink *string `json:"nextLink,omitempty"` // The list of peering registered prefixes. Value []*RegisteredPrefix `json:"value,omitempty"` }
RegisteredPrefixListResult - The paginated list of peering registered prefixes.
type RegisteredPrefixProperties ¶ added in v0.3.0
type RegisteredPrefixProperties struct { // The customer's prefix from which traffic originates. Prefix *string `json:"prefix,omitempty"` // READ-ONLY; The error message associated with the validation state, if any. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; The peering service prefix key that is to be shared with the customer. PeeringServicePrefixKey *string `json:"peeringServicePrefixKey,omitempty" azure:"ro"` // READ-ONLY; The prefix validation state. PrefixValidationState *PrefixValidationState `json:"prefixValidationState,omitempty" azure:"ro"` // READ-ONLY; The provisioning state of the resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
RegisteredPrefixProperties - The properties that define a registered prefix.
type RegisteredPrefixesClient ¶ added in v0.3.0
type RegisteredPrefixesClient struct {
// contains filtered or unexported fields
}
RegisteredPrefixesClient contains the methods for the RegisteredPrefixes group. Don't use this type directly, use NewRegisteredPrefixesClient() instead.
func NewRegisteredPrefixesClient ¶ added in v0.3.0
func NewRegisteredPrefixesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*RegisteredPrefixesClient, error)
NewRegisteredPrefixesClient creates a new instance of RegisteredPrefixesClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*RegisteredPrefixesClient) CreateOrUpdate ¶ added in v0.3.0
func (client *RegisteredPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringName string, registeredPrefixName string, registeredPrefix RegisteredPrefix, options *RegisteredPrefixesClientCreateOrUpdateOptions) (RegisteredPrefixesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a new registered prefix with the specified name under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. registeredPrefixName - The name of the registered prefix. registeredPrefix - The properties needed to create a registered prefix. options - RegisteredPrefixesClientCreateOrUpdateOptions contains the optional parameters for the RegisteredPrefixesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CreateRegisteredPrefix.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "rgName", "peeringName", "registeredPrefixName", armpeering.RegisteredPrefix{ Properties: &armpeering.RegisteredPrefixProperties{ Prefix: to.Ptr("10.22.20.0/24"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RegisteredPrefixesClient) Delete ¶ added in v0.3.0
func (client *RegisteredPrefixesClient) Delete(ctx context.Context, resourceGroupName string, peeringName string, registeredPrefixName string, options *RegisteredPrefixesClientDeleteOptions) (RegisteredPrefixesClientDeleteResponse, error)
Delete - Deletes an existing registered prefix with the specified name under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. registeredPrefixName - The name of the registered prefix. options - RegisteredPrefixesClientDeleteOptions contains the optional parameters for the RegisteredPrefixesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/DeleteRegisteredPrefix.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "rgName", "peeringName", "registeredPrefixName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*RegisteredPrefixesClient) Get ¶ added in v0.3.0
func (client *RegisteredPrefixesClient) Get(ctx context.Context, resourceGroupName string, peeringName string, registeredPrefixName string, options *RegisteredPrefixesClientGetOptions) (RegisteredPrefixesClientGetResponse, error)
Get - Gets an existing registered prefix with the specified name under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. registeredPrefixName - The name of the registered prefix. options - RegisteredPrefixesClientGetOptions contains the optional parameters for the RegisteredPrefixesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetRegisteredPrefix.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rgName", "peeringName", "registeredPrefixName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*RegisteredPrefixesClient) NewListByPeeringPager ¶ added in v0.5.0
func (client *RegisteredPrefixesClient) NewListByPeeringPager(resourceGroupName string, peeringName string, options *RegisteredPrefixesClientListByPeeringOptions) *runtime.Pager[RegisteredPrefixesClientListByPeeringResponse]
NewListByPeeringPager - Lists all registered prefixes under the given subscription, resource group and peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringName - The name of the peering. options - RegisteredPrefixesClientListByPeeringOptions contains the optional parameters for the RegisteredPrefixesClient.ListByPeering method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListRegisteredPrefixesByPeering.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewRegisteredPrefixesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByPeeringPager("rgName", "peeringName", 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 RegisteredPrefixesClientCreateOrUpdateOptions ¶ added in v0.3.0
type RegisteredPrefixesClientCreateOrUpdateOptions struct { }
RegisteredPrefixesClientCreateOrUpdateOptions contains the optional parameters for the RegisteredPrefixesClient.CreateOrUpdate method.
type RegisteredPrefixesClientCreateOrUpdateResponse ¶ added in v0.3.0
type RegisteredPrefixesClientCreateOrUpdateResponse struct {
RegisteredPrefix
}
RegisteredPrefixesClientCreateOrUpdateResponse contains the response from method RegisteredPrefixesClient.CreateOrUpdate.
type RegisteredPrefixesClientDeleteOptions ¶ added in v0.3.0
type RegisteredPrefixesClientDeleteOptions struct { }
RegisteredPrefixesClientDeleteOptions contains the optional parameters for the RegisteredPrefixesClient.Delete method.
type RegisteredPrefixesClientDeleteResponse ¶ added in v0.3.0
type RegisteredPrefixesClientDeleteResponse struct { }
RegisteredPrefixesClientDeleteResponse contains the response from method RegisteredPrefixesClient.Delete.
type RegisteredPrefixesClientGetOptions ¶ added in v0.3.0
type RegisteredPrefixesClientGetOptions struct { }
RegisteredPrefixesClientGetOptions contains the optional parameters for the RegisteredPrefixesClient.Get method.
type RegisteredPrefixesClientGetResponse ¶ added in v0.3.0
type RegisteredPrefixesClientGetResponse struct {
RegisteredPrefix
}
RegisteredPrefixesClientGetResponse contains the response from method RegisteredPrefixesClient.Get.
type RegisteredPrefixesClientListByPeeringOptions ¶ added in v0.3.0
type RegisteredPrefixesClientListByPeeringOptions struct { }
RegisteredPrefixesClientListByPeeringOptions contains the optional parameters for the RegisteredPrefixesClient.ListByPeering method.
type RegisteredPrefixesClientListByPeeringResponse ¶ added in v0.3.0
type RegisteredPrefixesClientListByPeeringResponse struct {
RegisteredPrefixListResult
}
RegisteredPrefixesClientListByPeeringResponse contains the response from method RegisteredPrefixesClient.ListByPeering.
type Resource ¶
type Resource struct { // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
Resource - The ARM resource class.
type ResourceTags ¶
type ResourceTags struct { // Gets or sets the tags, a dictionary of descriptors arm object Tags map[string]*string `json:"tags,omitempty"` }
ResourceTags - The resource tags.
func (ResourceTags) MarshalJSON ¶
func (r ResourceTags) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceTags.
type Role ¶ added in v0.3.0
type Role string
Role - The role of the contact.
func PossibleRoleValues ¶ added in v0.3.0
func PossibleRoleValues() []Role
PossibleRoleValues returns the possible values for the Role const type.
type SKU ¶ added in v0.2.0
type SKU struct { // The name of the peering SKU. Name *string `json:"name,omitempty"` // READ-ONLY; The family of the peering SKU. Family *Family `json:"family,omitempty" azure:"ro"` // READ-ONLY; The size of the peering SKU. Size *Size `json:"size,omitempty" azure:"ro"` // READ-ONLY; The tier of the peering SKU. Tier *Tier `json:"tier,omitempty" azure:"ro"` }
SKU - The SKU that defines the tier and kind of the peering.
type Service ¶ added in v0.2.0
type Service struct { // REQUIRED; The location of the resource. Location *string `json:"location,omitempty"` // The properties that define a peering service. Properties *ServiceProperties `json:"properties,omitempty"` // The SKU that defines the type of the peering service. SKU *ServiceSKU `json:"sku,omitempty"` // The resource tags. Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
Service - Peering Service
func (Service) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Service.
type ServiceCountriesClient ¶ added in v0.3.0
type ServiceCountriesClient struct {
// contains filtered or unexported fields
}
ServiceCountriesClient contains the methods for the PeeringServiceCountries group. Don't use this type directly, use NewServiceCountriesClient() instead.
func NewServiceCountriesClient ¶ added in v0.3.0
func NewServiceCountriesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceCountriesClient, error)
NewServiceCountriesClient creates a new instance of ServiceCountriesClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServiceCountriesClient) NewListPager ¶ added in v0.5.0
func (client *ServiceCountriesClient) NewListPager(options *ServiceCountriesClientListOptions) *runtime.Pager[ServiceCountriesClientListResponse]
NewListPager - Lists all of the available countries for peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - ServiceCountriesClientListOptions contains the optional parameters for the ServiceCountriesClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringServiceCountriesBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServiceCountriesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(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 ServiceCountriesClientListOptions ¶ added in v0.3.0
type ServiceCountriesClientListOptions struct { }
ServiceCountriesClientListOptions contains the optional parameters for the ServiceCountriesClient.List method.
type ServiceCountriesClientListResponse ¶ added in v0.3.0
type ServiceCountriesClientListResponse struct {
ServiceCountryListResult
}
ServiceCountriesClientListResponse contains the response from method ServiceCountriesClient.List.
type ServiceCountry ¶ added in v0.3.0
type ServiceCountry struct { // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
ServiceCountry - The peering service country.
type ServiceCountryListResult ¶ added in v0.3.0
type ServiceCountryListResult struct { // The link to fetch the next page of peering service countries. NextLink *string `json:"nextLink,omitempty"` // The list of peering service countries. Value []*ServiceCountry `json:"value,omitempty"` }
ServiceCountryListResult - The paginated list of peering service countries.
type ServiceListResult ¶ added in v0.2.0
type ServiceListResult struct { // The link to fetch the next page of peering services. NextLink *string `json:"nextLink,omitempty"` // The list of peering services. Value []*Service `json:"value,omitempty"` }
ServiceListResult - The paginated list of peering services.
type ServiceLocation ¶ added in v0.2.0
type ServiceLocation struct { // The properties that define a peering service location. Properties *ServiceLocationProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
ServiceLocation - The peering service location.
type ServiceLocationListResult ¶ added in v0.2.0
type ServiceLocationListResult struct { // The link to fetch the next page of peering service locations. NextLink *string `json:"nextLink,omitempty"` // The list of peering service locations. Value []*ServiceLocation `json:"value,omitempty"` }
ServiceLocationListResult - The paginated list of peering service locations.
type ServiceLocationProperties ¶ added in v0.2.0
type ServiceLocationProperties struct { // Azure region for the location AzureRegion *string `json:"azureRegion,omitempty"` // Country of the customer Country *string `json:"country,omitempty"` // State of the customer State *string `json:"state,omitempty"` }
ServiceLocationProperties - The properties that define connectivity to the Peering Service Location.
type ServiceLocationsClient ¶ added in v0.2.0
type ServiceLocationsClient struct {
// contains filtered or unexported fields
}
ServiceLocationsClient contains the methods for the PeeringServiceLocations group. Don't use this type directly, use NewServiceLocationsClient() instead.
func NewServiceLocationsClient ¶ added in v0.2.0
func NewServiceLocationsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceLocationsClient, error)
NewServiceLocationsClient creates a new instance of ServiceLocationsClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServiceLocationsClient) NewListPager ¶ added in v0.5.0
func (client *ServiceLocationsClient) NewListPager(options *ServiceLocationsClientListOptions) *runtime.Pager[ServiceLocationsClientListResponse]
NewListPager - Lists all of the available locations for peering service. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - ServiceLocationsClientListOptions contains the optional parameters for the ServiceLocationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringServiceLocationsBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServiceLocationsClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(&armpeering.ServiceLocationsClientListOptions{Country: 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 ServiceLocationsClientListOptions ¶ added in v0.2.0
type ServiceLocationsClientListOptions struct { // The country of interest, in which the locations are to be present. Country *string }
ServiceLocationsClientListOptions contains the optional parameters for the ServiceLocationsClient.List method.
type ServiceLocationsClientListResponse ¶ added in v0.2.0
type ServiceLocationsClientListResponse struct {
ServiceLocationListResult
}
ServiceLocationsClientListResponse contains the response from method ServiceLocationsClient.List.
type ServicePrefix ¶ added in v0.2.0
type ServicePrefix struct { // Gets or sets the peering prefix properties. Properties *ServicePrefixProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
ServicePrefix - The peering service prefix class.
type ServicePrefixEvent ¶ added in v0.3.0
type ServicePrefixEvent struct { // READ-ONLY; The description of the event associated with a prefix. EventDescription *string `json:"eventDescription,omitempty" azure:"ro"` // READ-ONLY; The level of the event associated with a prefix. EventLevel *string `json:"eventLevel,omitempty" azure:"ro"` // READ-ONLY; The summary of the event associated with a prefix. EventSummary *string `json:"eventSummary,omitempty" azure:"ro"` // READ-ONLY; The timestamp of the event associated with a prefix. EventTimestamp *time.Time `json:"eventTimestamp,omitempty" azure:"ro"` // READ-ONLY; The type of the event associated with a prefix. EventType *string `json:"eventType,omitempty" azure:"ro"` }
ServicePrefixEvent - The details of the event associated with a prefix.
func (ServicePrefixEvent) MarshalJSON ¶ added in v0.3.0
func (s ServicePrefixEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrefixEvent.
func (*ServicePrefixEvent) UnmarshalJSON ¶ added in v0.3.0
func (s *ServicePrefixEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ServicePrefixEvent.
type ServicePrefixListResult ¶ added in v0.2.0
type ServicePrefixListResult struct { // The link to fetch the next page of peering service prefixes. NextLink *string `json:"nextLink,omitempty"` // The list of peering service prefixes. Value []*ServicePrefix `json:"value,omitempty"` }
ServicePrefixListResult - The paginated list of peering service prefixes.
type ServicePrefixProperties ¶ added in v0.2.0
type ServicePrefixProperties struct { // The peering service prefix key PeeringServicePrefixKey *string `json:"peeringServicePrefixKey,omitempty"` // The prefix from which your traffic originates. Prefix *string `json:"prefix,omitempty"` // READ-ONLY; The error message for validation state ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; The list of events for peering service prefix Events []*ServicePrefixEvent `json:"events,omitempty" azure:"ro"` // READ-ONLY; The prefix learned type LearnedType *LearnedType `json:"learnedType,omitempty" azure:"ro"` // READ-ONLY; The prefix validation state PrefixValidationState *PrefixValidationState `json:"prefixValidationState,omitempty" azure:"ro"` // READ-ONLY; The provisioning state of the resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
ServicePrefixProperties - The peering service prefix properties class.
func (ServicePrefixProperties) MarshalJSON ¶ added in v0.3.0
func (s ServicePrefixProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServicePrefixProperties.
type ServiceProperties ¶ added in v0.2.0
type ServiceProperties struct { // The Log Analytics Workspace Properties LogAnalyticsWorkspaceProperties *LogAnalyticsWorkspaceProperties `json:"logAnalyticsWorkspaceProperties,omitempty"` // The location (state/province) of the customer. PeeringServiceLocation *string `json:"peeringServiceLocation,omitempty"` // The name of the service provider. PeeringServiceProvider *string `json:"peeringServiceProvider,omitempty"` // The backup peering (Microsoft/service provider) location to be used for customer traffic. ProviderBackupPeeringLocation *string `json:"providerBackupPeeringLocation,omitempty"` // The primary peering (Microsoft/service provider) location to be used for customer traffic. ProviderPrimaryPeeringLocation *string `json:"providerPrimaryPeeringLocation,omitempty"` // READ-ONLY; The provisioning state of the resource. ProvisioningState *ProvisioningState `json:"provisioningState,omitempty" azure:"ro"` }
ServiceProperties - The properties that define connectivity to the Peering Service.
type ServiceProvider ¶ added in v0.2.0
type ServiceProvider struct { // The properties that define a peering service provider. Properties *ServiceProviderProperties `json:"properties,omitempty"` // READ-ONLY; The ID of the resource. 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. Type *string `json:"type,omitempty" azure:"ro"` }
ServiceProvider - PeeringService provider
type ServiceProviderListResult ¶ added in v0.2.0
type ServiceProviderListResult struct { // The link to fetch the next page of peering service providers. NextLink *string `json:"nextLink,omitempty"` // The list of peering service providers. Value []*ServiceProvider `json:"value,omitempty"` }
ServiceProviderListResult - The paginated list of peering service providers.
type ServiceProviderProperties ¶ added in v0.2.0
type ServiceProviderProperties struct { // The list of locations at which the service provider peers with Microsoft. PeeringLocations []*string `json:"peeringLocations,omitempty"` // The name of the service provider. ServiceProviderName *string `json:"serviceProviderName,omitempty"` }
ServiceProviderProperties - The properties that define connectivity to the Peering Service Provider.
func (ServiceProviderProperties) MarshalJSON ¶ added in v0.3.0
func (s ServiceProviderProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ServiceProviderProperties.
type ServiceProvidersClient ¶ added in v0.2.0
type ServiceProvidersClient struct {
// contains filtered or unexported fields
}
ServiceProvidersClient contains the methods for the PeeringServiceProviders group. Don't use this type directly, use NewServiceProvidersClient() instead.
func NewServiceProvidersClient ¶ added in v0.2.0
func NewServiceProvidersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServiceProvidersClient, error)
NewServiceProvidersClient creates a new instance of ServiceProvidersClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServiceProvidersClient) NewListPager ¶ added in v0.5.0
func (client *ServiceProvidersClient) NewListPager(options *ServiceProvidersClientListOptions) *runtime.Pager[ServiceProvidersClientListResponse]
NewListPager - Lists all of the available peering service locations for the specified kind of peering. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - ServiceProvidersClientListOptions contains the optional parameters for the ServiceProvidersClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringServiceProviders.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServiceProvidersClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(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 ServiceProvidersClientListOptions ¶ added in v0.2.0
type ServiceProvidersClientListOptions struct { }
ServiceProvidersClientListOptions contains the optional parameters for the ServiceProvidersClient.List method.
type ServiceProvidersClientListResponse ¶ added in v0.2.0
type ServiceProvidersClientListResponse struct {
ServiceProviderListResult
}
ServiceProvidersClientListResponse contains the response from method ServiceProvidersClient.List.
type ServiceSKU ¶ added in v0.3.0
type ServiceSKU struct { // The name of the peering service SKU. Name *string `json:"name,omitempty"` }
ServiceSKU - The SKU that defines the type of the peering service.
type ServiceSpecification ¶ added in v0.3.0
type ServiceSpecification struct { // READ-ONLY; Specifications of the Metrics for Azure Monitoring. MetricSpecifications []*MetricSpecification `json:"metricSpecifications,omitempty" azure:"ro"` }
ServiceSpecification - Service specification payload.
type ServicesClient ¶ added in v0.2.0
type ServicesClient struct {
// contains filtered or unexported fields
}
ServicesClient contains the methods for the PeeringServices group. Don't use this type directly, use NewServicesClient() instead.
func NewServicesClient ¶ added in v0.2.0
func NewServicesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ServicesClient, error)
NewServicesClient creates a new instance of ServicesClient with the specified values. subscriptionID - The Azure subscription ID. credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*ServicesClient) CreateOrUpdate ¶ added in v0.2.0
func (client *ServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, peeringServiceName string, peeringService Service, options *ServicesClientCreateOrUpdateOptions) (ServicesClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a new peering service or updates an existing peering with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. peeringService - The properties needed to create or update a peering service. options - ServicesClientCreateOrUpdateOptions contains the optional parameters for the ServicesClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/CreatePeeringService.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServicesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.CreateOrUpdate(ctx, "rgName", "peeringServiceName", armpeering.Service{ Location: to.Ptr("eastus"), Properties: &armpeering.ServiceProperties{ PeeringServiceLocation: to.Ptr("state1"), PeeringServiceProvider: to.Ptr("serviceProvider1"), ProviderBackupPeeringLocation: to.Ptr("peeringLocation2"), ProviderPrimaryPeeringLocation: to.Ptr("peeringLocation1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ServicesClient) Delete ¶ added in v0.2.0
func (client *ServicesClient) Delete(ctx context.Context, resourceGroupName string, peeringServiceName string, options *ServicesClientDeleteOptions) (ServicesClientDeleteResponse, error)
Delete - Deletes an existing peering service with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. options - ServicesClientDeleteOptions contains the optional parameters for the ServicesClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/DeletePeeringService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServicesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "rgName", "peeringServiceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ServicesClient) Get ¶ added in v0.2.0
func (client *ServicesClient) Get(ctx context.Context, resourceGroupName string, peeringServiceName string, options *ServicesClientGetOptions) (ServicesClientGetResponse, error)
Get - Gets an existing peering service with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering. options - ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/GetPeeringService.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServicesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "rgName", "peeringServiceName", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*ServicesClient) InitializeConnectionMonitor ¶ added in v0.3.0
func (client *ServicesClient) InitializeConnectionMonitor(ctx context.Context, options *ServicesClientInitializeConnectionMonitorOptions) (ServicesClientInitializeConnectionMonitorResponse, error)
InitializeConnectionMonitor - Initialize Peering Service for Connection Monitor functionality If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - ServicesClientInitializeConnectionMonitorOptions contains the optional parameters for the ServicesClient.InitializeConnectionMonitor method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/InitializeConnectionMonitor.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServicesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.InitializeConnectionMonitor(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ServicesClient) NewListByResourceGroupPager ¶ added in v0.5.0
func (client *ServicesClient) NewListByResourceGroupPager(resourceGroupName string, options *ServicesClientListByResourceGroupOptions) *runtime.Pager[ServicesClientListByResourceGroupResponse]
NewListByResourceGroupPager - Lists all of the peering services under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. options - ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringServicesByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServicesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("rgName", 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 (*ServicesClient) NewListBySubscriptionPager ¶ added in v0.5.0
func (client *ServicesClient) NewListBySubscriptionPager(options *ServicesClientListBySubscriptionOptions) *runtime.Pager[ServicesClientListBySubscriptionResponse]
NewListBySubscriptionPager - Lists all of the peerings under the given subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 options - ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/ListPeeringServicesBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServicesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(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 (*ServicesClient) Update ¶ added in v0.2.0
func (client *ServicesClient) Update(ctx context.Context, resourceGroupName string, peeringServiceName string, tags ResourceTags, options *ServicesClientUpdateOptions) (ServicesClientUpdateResponse, error)
Update - Updates tags for a peering service with the specified name under the given subscription and resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2022-01-01 resourceGroupName - The name of the resource group. peeringServiceName - The name of the peering service. tags - The resource tags. options - ServicesClientUpdateOptions contains the optional parameters for the ServicesClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/peering/resource-manager/Microsoft.Peering/stable/2022-01-01/examples/UpdatePeeringServiceTags.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/peering/armpeering" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armpeering.NewServicesClient("subId", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Update(ctx, "rgName", "peeringServiceName", armpeering.ResourceTags{ Tags: map[string]*string{ "tag0": to.Ptr("value0"), "tag1": to.Ptr("value1"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
type ServicesClientCreateOrUpdateOptions ¶ added in v0.2.0
type ServicesClientCreateOrUpdateOptions struct { }
ServicesClientCreateOrUpdateOptions contains the optional parameters for the ServicesClient.CreateOrUpdate method.
type ServicesClientCreateOrUpdateResponse ¶ added in v0.2.0
type ServicesClientCreateOrUpdateResponse struct {
Service
}
ServicesClientCreateOrUpdateResponse contains the response from method ServicesClient.CreateOrUpdate.
type ServicesClientDeleteOptions ¶ added in v0.2.0
type ServicesClientDeleteOptions struct { }
ServicesClientDeleteOptions contains the optional parameters for the ServicesClient.Delete method.
type ServicesClientDeleteResponse ¶ added in v0.2.0
type ServicesClientDeleteResponse struct { }
ServicesClientDeleteResponse contains the response from method ServicesClient.Delete.
type ServicesClientGetOptions ¶ added in v0.2.0
type ServicesClientGetOptions struct { }
ServicesClientGetOptions contains the optional parameters for the ServicesClient.Get method.
type ServicesClientGetResponse ¶ added in v0.2.0
type ServicesClientGetResponse struct {
Service
}
ServicesClientGetResponse contains the response from method ServicesClient.Get.
type ServicesClientInitializeConnectionMonitorOptions ¶ added in v0.3.0
type ServicesClientInitializeConnectionMonitorOptions struct { }
ServicesClientInitializeConnectionMonitorOptions contains the optional parameters for the ServicesClient.InitializeConnectionMonitor method.
type ServicesClientInitializeConnectionMonitorResponse ¶ added in v0.3.0
type ServicesClientInitializeConnectionMonitorResponse struct { }
ServicesClientInitializeConnectionMonitorResponse contains the response from method ServicesClient.InitializeConnectionMonitor.
type ServicesClientListByResourceGroupOptions ¶ added in v0.2.0
type ServicesClientListByResourceGroupOptions struct { }
ServicesClientListByResourceGroupOptions contains the optional parameters for the ServicesClient.ListByResourceGroup method.
type ServicesClientListByResourceGroupResponse ¶ added in v0.2.0
type ServicesClientListByResourceGroupResponse struct {
ServiceListResult
}
ServicesClientListByResourceGroupResponse contains the response from method ServicesClient.ListByResourceGroup.
type ServicesClientListBySubscriptionOptions ¶ added in v0.2.0
type ServicesClientListBySubscriptionOptions struct { }
ServicesClientListBySubscriptionOptions contains the optional parameters for the ServicesClient.ListBySubscription method.
type ServicesClientListBySubscriptionResponse ¶ added in v0.2.0
type ServicesClientListBySubscriptionResponse struct {
ServiceListResult
}
ServicesClientListBySubscriptionResponse contains the response from method ServicesClient.ListBySubscription.
type ServicesClientUpdateOptions ¶ added in v0.2.0
type ServicesClientUpdateOptions struct { }
ServicesClientUpdateOptions contains the optional parameters for the ServicesClient.Update method.
type ServicesClientUpdateResponse ¶ added in v0.2.0
type ServicesClientUpdateResponse struct {
Service
}
ServicesClientUpdateResponse contains the response from method ServicesClient.Update.
type SessionAddressProvider ¶
type SessionAddressProvider string
SessionAddressProvider - The field indicating if Microsoft provides session ip addresses.
const ( SessionAddressProviderMicrosoft SessionAddressProvider = "Microsoft" SessionAddressProviderPeer SessionAddressProvider = "Peer" )
func PossibleSessionAddressProviderValues ¶
func PossibleSessionAddressProviderValues() []SessionAddressProvider
PossibleSessionAddressProviderValues returns the possible values for the SessionAddressProvider const type.
type SessionStateV4 ¶
type SessionStateV4 string
SessionStateV4 - The state of the IPv4 session.
const ( SessionStateV4Active SessionStateV4 = "Active" SessionStateV4Connect SessionStateV4 = "Connect" SessionStateV4Established SessionStateV4 = "Established" SessionStateV4Idle SessionStateV4 = "Idle" SessionStateV4None SessionStateV4 = "None" SessionStateV4OpenConfirm SessionStateV4 = "OpenConfirm" SessionStateV4OpenReceived SessionStateV4 = "OpenReceived" SessionStateV4OpenSent SessionStateV4 = "OpenSent" SessionStateV4PendingAdd SessionStateV4 = "PendingAdd" SessionStateV4PendingRemove SessionStateV4 = "PendingRemove" SessionStateV4PendingUpdate SessionStateV4 = "PendingUpdate" )
func PossibleSessionStateV4Values ¶
func PossibleSessionStateV4Values() []SessionStateV4
PossibleSessionStateV4Values returns the possible values for the SessionStateV4 const type.
type SessionStateV6 ¶
type SessionStateV6 string
SessionStateV6 - The state of the IPv6 session.
const ( SessionStateV6Active SessionStateV6 = "Active" SessionStateV6Connect SessionStateV6 = "Connect" SessionStateV6Established SessionStateV6 = "Established" SessionStateV6Idle SessionStateV6 = "Idle" SessionStateV6None SessionStateV6 = "None" SessionStateV6OpenConfirm SessionStateV6 = "OpenConfirm" SessionStateV6OpenReceived SessionStateV6 = "OpenReceived" SessionStateV6OpenSent SessionStateV6 = "OpenSent" SessionStateV6PendingAdd SessionStateV6 = "PendingAdd" SessionStateV6PendingRemove SessionStateV6 = "PendingRemove" SessionStateV6PendingUpdate SessionStateV6 = "PendingUpdate" )
func PossibleSessionStateV6Values ¶
func PossibleSessionStateV6Values() []SessionStateV6
PossibleSessionStateV6Values returns the possible values for the SessionStateV6 const type.
type Size ¶
type Size string
Size - The size of the peering SKU.
func PossibleSizeValues ¶
func PossibleSizeValues() []Size
PossibleSizeValues returns the possible values for the Size const type.
type SubResource ¶
type SubResource struct { // The identifier of the referenced resource. ID *string `json:"id,omitempty"` }
SubResource - The sub resource.
type Tier ¶
type Tier string
Tier - The tier of the peering SKU.
func PossibleTierValues ¶
func PossibleTierValues() []Tier
PossibleTierValues returns the possible values for the Tier const type.
type ValidationState ¶
type ValidationState string
ValidationState - The validation state of the ASN associated with the peer.
const ( ValidationStateApproved ValidationState = "Approved" ValidationStateFailed ValidationState = "Failed" ValidationStateNone ValidationState = "None" ValidationStatePending ValidationState = "Pending" )
func PossibleValidationStateValues ¶
func PossibleValidationStateValues() []ValidationState
PossibleValidationStateValues returns the possible values for the ValidationState const type.
Source Files ¶
- build.go
- zz_generated_cdnpeeringprefixes_client.go
- zz_generated_connectionmonitortests_client.go
- zz_generated_constants.go
- zz_generated_legacypeerings_client.go
- zz_generated_locations_client.go
- zz_generated_lookingglass_client.go
- zz_generated_management_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operations_client.go
- zz_generated_peerasns_client.go
- zz_generated_peerings_client.go
- zz_generated_prefixes_client.go
- zz_generated_receivedroutes_client.go
- zz_generated_registeredasns_client.go
- zz_generated_registeredprefixes_client.go
- zz_generated_response_types.go
- zz_generated_servicecountries_client.go
- zz_generated_servicelocations_client.go
- zz_generated_serviceproviders_client.go
- zz_generated_services_client.go
- zz_generated_time_rfc3339.go