Documentation ¶
Index ¶
- type ClientFactory
- func (c *ClientFactory) NewGroupsClient() *GroupsClient
- func (c *ClientFactory) NewManagedNetworksClient() *ManagedNetworksClient
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewPeeringPoliciesClient() *PeeringPoliciesClient
- func (c *ClientFactory) NewScopeAssignmentsClient() *ScopeAssignmentsClient
- type ConnectivityCollection
- type ErrorResponse
- type Group
- type GroupListResult
- type GroupProperties
- type GroupsClient
- func (client *GroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (*runtime.Poller[GroupsClientCreateOrUpdateResponse], error)
- func (client *GroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (*runtime.Poller[GroupsClientDeleteResponse], error)
- func (client *GroupsClient) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (GroupsClientGetResponse, error)
- func (client *GroupsClient) NewListByManagedNetworkPager(resourceGroupName string, managedNetworkName string, ...) *runtime.Pager[GroupsClientListByManagedNetworkResponse]
- type GroupsClientBeginCreateOrUpdateOptions
- type GroupsClientBeginDeleteOptions
- type GroupsClientCreateOrUpdateResponse
- type GroupsClientDeleteResponse
- type GroupsClientGetOptions
- type GroupsClientGetResponse
- type GroupsClientListByManagedNetworkOptions
- type GroupsClientListByManagedNetworkResponse
- type HubAndSpokePeeringPolicyProperties
- type Kind
- type ListResult
- type ManagedNetwork
- type ManagedNetworksClient
- func (client *ManagedNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (*runtime.Poller[ManagedNetworksClientDeleteResponse], error)
- func (client *ManagedNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (*runtime.Poller[ManagedNetworksClientUpdateResponse], error)
- func (client *ManagedNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (ManagedNetworksClientCreateOrUpdateResponse, error)
- func (client *ManagedNetworksClient) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (ManagedNetworksClientGetResponse, error)
- func (client *ManagedNetworksClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[ManagedNetworksClientListByResourceGroupResponse]
- func (client *ManagedNetworksClient) NewListBySubscriptionPager(options *ManagedNetworksClientListBySubscriptionOptions) *runtime.Pager[ManagedNetworksClientListBySubscriptionResponse]
- type ManagedNetworksClientBeginDeleteOptions
- type ManagedNetworksClientBeginUpdateOptions
- type ManagedNetworksClientCreateOrUpdateOptions
- type ManagedNetworksClientCreateOrUpdateResponse
- type ManagedNetworksClientDeleteResponse
- type ManagedNetworksClientGetOptions
- type ManagedNetworksClientGetResponse
- type ManagedNetworksClientListByResourceGroupOptions
- type ManagedNetworksClientListByResourceGroupResponse
- type ManagedNetworksClientListBySubscriptionOptions
- type ManagedNetworksClientListBySubscriptionResponse
- type ManagedNetworksClientUpdateResponse
- type MeshPeeringPolicyProperties
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type PeeringPoliciesClient
- func (client *PeeringPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (*runtime.Poller[PeeringPoliciesClientCreateOrUpdateResponse], error)
- func (client *PeeringPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (*runtime.Poller[PeeringPoliciesClientDeleteResponse], error)
- func (client *PeeringPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, ...) (PeeringPoliciesClientGetResponse, error)
- func (client *PeeringPoliciesClient) NewListByManagedNetworkPager(resourceGroupName string, managedNetworkName string, ...) *runtime.Pager[PeeringPoliciesClientListByManagedNetworkResponse]
- type PeeringPoliciesClientBeginCreateOrUpdateOptions
- type PeeringPoliciesClientBeginDeleteOptions
- type PeeringPoliciesClientCreateOrUpdateResponse
- type PeeringPoliciesClientDeleteResponse
- type PeeringPoliciesClientGetOptions
- type PeeringPoliciesClientGetResponse
- type PeeringPoliciesClientListByManagedNetworkOptions
- type PeeringPoliciesClientListByManagedNetworkResponse
- type PeeringPolicy
- type PeeringPolicyListResult
- type PeeringPolicyProperties
- type Properties
- type ProvisioningState
- type ProxyResource
- type Resource
- type ResourceID
- type ResourceProperties
- type Scope
- type ScopeAssignment
- type ScopeAssignmentListResult
- type ScopeAssignmentProperties
- type ScopeAssignmentsClient
- func (client *ScopeAssignmentsClient) CreateOrUpdate(ctx context.Context, scope string, scopeAssignmentName string, ...) (ScopeAssignmentsClientCreateOrUpdateResponse, error)
- func (client *ScopeAssignmentsClient) Delete(ctx context.Context, scope string, scopeAssignmentName string, ...) (ScopeAssignmentsClientDeleteResponse, error)
- func (client *ScopeAssignmentsClient) Get(ctx context.Context, scope string, scopeAssignmentName string, ...) (ScopeAssignmentsClientGetResponse, error)
- func (client *ScopeAssignmentsClient) NewListPager(scope string, options *ScopeAssignmentsClientListOptions) *runtime.Pager[ScopeAssignmentsClientListResponse]
- type ScopeAssignmentsClientCreateOrUpdateOptions
- type ScopeAssignmentsClientCreateOrUpdateResponse
- type ScopeAssignmentsClientDeleteOptions
- type ScopeAssignmentsClientDeleteResponse
- type ScopeAssignmentsClientGetOptions
- type ScopeAssignmentsClientGetResponse
- type ScopeAssignmentsClientListOptions
- type ScopeAssignmentsClientListResponse
- type TrackedResource
- type Type
- type Update
Examples ¶
- GroupsClient.BeginCreateOrUpdate
- GroupsClient.BeginDelete
- GroupsClient.Get
- GroupsClient.NewListByManagedNetworkPager
- ManagedNetworksClient.BeginDelete
- ManagedNetworksClient.BeginUpdate
- ManagedNetworksClient.CreateOrUpdate
- ManagedNetworksClient.Get
- ManagedNetworksClient.NewListByResourceGroupPager
- ManagedNetworksClient.NewListBySubscriptionPager
- PeeringPoliciesClient.BeginCreateOrUpdate
- PeeringPoliciesClient.BeginDelete
- PeeringPoliciesClient.Get
- PeeringPoliciesClient.NewListByManagedNetworkPager
- ScopeAssignmentsClient.CreateOrUpdate
- ScopeAssignmentsClient.Delete
- ScopeAssignmentsClient.Get
- ScopeAssignmentsClient.NewListPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶ added in v0.2.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v0.2.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewGroupsClient ¶ added in v0.2.0
func (c *ClientFactory) NewGroupsClient() *GroupsClient
NewGroupsClient creates a new instance of GroupsClient.
func (*ClientFactory) NewManagedNetworksClient ¶ added in v0.2.0
func (c *ClientFactory) NewManagedNetworksClient() *ManagedNetworksClient
NewManagedNetworksClient creates a new instance of ManagedNetworksClient.
func (*ClientFactory) NewOperationsClient ¶ added in v0.2.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewPeeringPoliciesClient ¶ added in v0.2.0
func (c *ClientFactory) NewPeeringPoliciesClient() *PeeringPoliciesClient
NewPeeringPoliciesClient creates a new instance of PeeringPoliciesClient.
func (*ClientFactory) NewScopeAssignmentsClient ¶ added in v0.2.0
func (c *ClientFactory) NewScopeAssignmentsClient() *ScopeAssignmentsClient
NewScopeAssignmentsClient creates a new instance of ScopeAssignmentsClient.
type ConnectivityCollection ¶
type ConnectivityCollection struct { // READ-ONLY; The collection of connectivity related Managed Network Groups within the Managed Network Groups []*Group // READ-ONLY; The collection of Managed Network Peering Policies within the Managed Network Peerings []*PeeringPolicy }
ConnectivityCollection - The collection of Connectivity related groups and policies within the Managed Network
func (ConnectivityCollection) MarshalJSON ¶
func (c ConnectivityCollection) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ConnectivityCollection.
func (*ConnectivityCollection) UnmarshalJSON ¶ added in v0.2.0
func (c *ConnectivityCollection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ConnectivityCollection.
type ErrorResponse ¶
type ErrorResponse struct { // READ-ONLY; The error code. Code *string // READ-ONLY; The error message. Message *string }
ErrorResponse - The error response that indicates why an operation has failed.
func (ErrorResponse) MarshalJSON ¶ added in v0.2.0
func (e ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ErrorResponse.
func (*ErrorResponse) UnmarshalJSON ¶ added in v0.2.0
func (e *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.
type Group ¶
type Group struct { // Responsibility role under which this Managed Network Group will be created Kind *Kind // The geo-location where the resource lives Location *string // Gets or sets the properties of a network group Properties *GroupProperties // READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
Group - The Managed Network Group resource
func (Group) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Group.
func (*Group) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Group.
type GroupListResult ¶
type GroupListResult struct { // Gets the URL to get the next set of results. NextLink *string // Gets a page of ManagedNetworkGroup Value []*Group }
GroupListResult - Result of the request to list Managed Network Groups. It contains a list of groups and a URL link to get the next set of results.
func (GroupListResult) MarshalJSON ¶ added in v0.2.0
func (g GroupListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GroupListResult.
func (*GroupListResult) UnmarshalJSON ¶ added in v0.2.0
func (g *GroupListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GroupListResult.
type GroupProperties ¶
type GroupProperties struct { // The collection of management groups covered by the Managed Network ManagementGroups []*ResourceID // The collection of subnets covered by the Managed Network Subnets []*ResourceID // The collection of subscriptions covered by the Managed Network Subscriptions []*ResourceID // The collection of virtual nets covered by the Managed Network VirtualNetworks []*ResourceID // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Provisioning state of the ManagedNetwork resource. ProvisioningState *ProvisioningState }
GroupProperties - Properties of a Managed Network Group
func (GroupProperties) MarshalJSON ¶
func (g GroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type GroupProperties.
func (*GroupProperties) UnmarshalJSON ¶ added in v0.2.0
func (g *GroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type GroupProperties.
type GroupsClient ¶
type GroupsClient struct {
// contains filtered or unexported fields
}
GroupsClient contains the methods for the ManagedNetworkGroups group. Don't use this type directly, use NewGroupsClient() instead.
func NewGroupsClient ¶
func NewGroupsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupsClient, error)
NewGroupsClient creates a new instance of GroupsClient with the specified values.
- subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*GroupsClient) BeginCreateOrUpdate ¶
func (client *GroupsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkGroupName string, managedNetworkGroup Group, options *GroupsClientBeginCreateOrUpdateOptions) (*runtime.Poller[GroupsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The Put ManagedNetworkGroups operation creates or updates a Managed Network Group resource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- managedNetworkGroupName - The name of the Managed Network Group.
- managedNetworkGroup - Parameters supplied to the create/update a Managed Network Group resource
- options - GroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the GroupsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkGroup/ManagedNetworkGroupsPut.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/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGroupsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myManagedNetwork", "myManagedNetworkGroup1", armmanagednetwork.Group{ Properties: &armmanagednetwork.GroupProperties{ ManagementGroups: []*armmanagednetwork.ResourceID{}, Subnets: []*armmanagednetwork.ResourceID{ { ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA/subnets/subnetA"), }}, Subscriptions: []*armmanagednetwork.ResourceID{}, VirtualNetworks: []*armmanagednetwork.ResourceID{ { ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), }, { ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Group = armmanagednetwork.Group{ // Name: to.Ptr("myManagedNetworkGroup1"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworkGroups"), // ID: to.Ptr("/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"), // Properties: &armmanagednetwork.GroupProperties{ // Etag: to.Ptr("asdf-asdf-asdf1"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // ManagementGroups: []*armmanagednetwork.ResourceID{ // }, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA/subnets/subnetA"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // }, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // } }
Output:
func (*GroupsClient) BeginDelete ¶
func (client *GroupsClient) BeginDelete(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkGroupName string, options *GroupsClientBeginDeleteOptions) (*runtime.Poller[GroupsClientDeleteResponse], error)
BeginDelete - The Delete ManagedNetworkGroups operation deletes a Managed Network Group specified by the resource group, Managed Network name, and group name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- managedNetworkGroupName - The name of the Managed Network Group.
- options - GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkGroup/ManagedNetworkGroupsDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewGroupsClient().BeginDelete(ctx, "myResourceGroup", "myManagedNetwork", "myManagedNetworkGroup1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*GroupsClient) Get ¶
func (client *GroupsClient) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkGroupName string, options *GroupsClientGetOptions) (GroupsClientGetResponse, error)
Get - The Get ManagedNetworkGroups operation gets a Managed Network Group specified by the resource group, Managed Network name, and group name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- managedNetworkGroupName - The name of the Managed Network Group.
- options - GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkGroup/ManagedNetworkGroupsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewGroupsClient().Get(ctx, "myResourceGroup", "myManagedNetwork", "myManagedNetworkGroup1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Group = armmanagednetwork.Group{ // Name: to.Ptr("myManagedNetworkGroup1"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworkGroups"), // ID: to.Ptr("/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"), // Properties: &armmanagednetwork.GroupProperties{ // Etag: to.Ptr("asdf-asdf-asdf1"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // ManagementGroups: []*armmanagednetwork.ResourceID{ // }, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA/subnets/subnetA"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // }, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // } }
Output:
func (*GroupsClient) NewListByManagedNetworkPager ¶
func (client *GroupsClient) NewListByManagedNetworkPager(resourceGroupName string, managedNetworkName string, options *GroupsClientListByManagedNetworkOptions) *runtime.Pager[GroupsClientListByManagedNetworkResponse]
NewListByManagedNetworkPager - The ListByManagedNetwork ManagedNetworkGroup operation retrieves all the Managed Network Groups in a specified Managed Networks in a paginated format.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- options - GroupsClientListByManagedNetworkOptions contains the optional parameters for the GroupsClient.NewListByManagedNetworkPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkGroup/ManagedNetworkGroupsListByManagedNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewGroupsClient().NewListByManagedNetworkPager("myResourceGroup", "myManagedNetwork", &armmanagednetwork.GroupsClientListByManagedNetworkOptions{Top: nil, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.GroupListResult = armmanagednetwork.GroupListResult{ // Value: []*armmanagednetwork.Group{ // { // Name: to.Ptr("myManagedNetworkGroup1"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworkGroups"), // ID: to.Ptr("/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"), // Properties: &armmanagednetwork.GroupProperties{ // Etag: to.Ptr("asdf-asdf-asdf1"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // ManagementGroups: []*armmanagednetwork.ResourceID{ // }, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA/subnets/subnetA"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // }, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // }}, // } } }
Output:
type GroupsClientBeginCreateOrUpdateOptions ¶
type GroupsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GroupsClientBeginCreateOrUpdateOptions contains the optional parameters for the GroupsClient.BeginCreateOrUpdate method.
type GroupsClientBeginDeleteOptions ¶
type GroupsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
GroupsClientBeginDeleteOptions contains the optional parameters for the GroupsClient.BeginDelete method.
type GroupsClientCreateOrUpdateResponse ¶
type GroupsClientCreateOrUpdateResponse struct { // The Managed Network Group resource Group }
GroupsClientCreateOrUpdateResponse contains the response from method GroupsClient.BeginCreateOrUpdate.
type GroupsClientDeleteResponse ¶
type GroupsClientDeleteResponse struct { }
GroupsClientDeleteResponse contains the response from method GroupsClient.BeginDelete.
type GroupsClientGetOptions ¶
type GroupsClientGetOptions struct { }
GroupsClientGetOptions contains the optional parameters for the GroupsClient.Get method.
type GroupsClientGetResponse ¶
type GroupsClientGetResponse struct { // The Managed Network Group resource Group }
GroupsClientGetResponse contains the response from method GroupsClient.Get.
type GroupsClientListByManagedNetworkOptions ¶
type GroupsClientListByManagedNetworkOptions struct { // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skiptoken parameter that // specifies a starting point to use for subsequent calls. Skiptoken *string // May be used to limit the number of results in a page for list queries. Top *int32 }
GroupsClientListByManagedNetworkOptions contains the optional parameters for the GroupsClient.NewListByManagedNetworkPager method.
type GroupsClientListByManagedNetworkResponse ¶
type GroupsClientListByManagedNetworkResponse struct { // Result of the request to list Managed Network Groups. It contains a list of groups and a URL link to get the next set of // results. GroupListResult }
GroupsClientListByManagedNetworkResponse contains the response from method GroupsClient.NewListByManagedNetworkPager.
type HubAndSpokePeeringPolicyProperties ¶
type HubAndSpokePeeringPolicyProperties struct { // REQUIRED; Gets or sets the connectivity type of a network structure policy Type *Type // Gets or sets the hub virtual network ID Hub *ResourceID // Gets or sets the mesh group IDs Mesh []*ResourceID // Gets or sets the spokes group IDs Spokes []*ResourceID // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Provisioning state of the ManagedNetwork resource. ProvisioningState *ProvisioningState }
HubAndSpokePeeringPolicyProperties - Properties of a Hub and Spoke Peering Policy
func (HubAndSpokePeeringPolicyProperties) MarshalJSON ¶
func (h HubAndSpokePeeringPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type HubAndSpokePeeringPolicyProperties.
func (*HubAndSpokePeeringPolicyProperties) UnmarshalJSON ¶ added in v0.2.0
func (h *HubAndSpokePeeringPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type HubAndSpokePeeringPolicyProperties.
type Kind ¶
type Kind string
Kind - Responsibility role under which this Managed Network Group will be created
const (
KindConnectivity Kind = "Connectivity"
)
func PossibleKindValues ¶
func PossibleKindValues() []Kind
PossibleKindValues returns the possible values for the Kind const type.
type ListResult ¶
type ListResult struct { // Gets the URL to get the next page of results. NextLink *string // Gets a page of ManagedNetworks Value []*ManagedNetwork }
ListResult - Result of the request to list Managed Network. It contains a list of Managed Networks and a URL link to get the next set of results.
func (ListResult) MarshalJSON ¶ added in v0.2.0
func (l ListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ListResult.
func (*ListResult) UnmarshalJSON ¶ added in v0.2.0
func (l *ListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ListResult.
type ManagedNetwork ¶
type ManagedNetwork struct { // The geo-location where the resource lives Location *string // The MNC properties Properties *Properties // Resource tags Tags map[string]*string // READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
ManagedNetwork - The Managed Network resource
func (ManagedNetwork) MarshalJSON ¶
func (m ManagedNetwork) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ManagedNetwork.
func (*ManagedNetwork) UnmarshalJSON ¶ added in v0.2.0
func (m *ManagedNetwork) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNetwork.
type ManagedNetworksClient ¶
type ManagedNetworksClient struct {
// contains filtered or unexported fields
}
ManagedNetworksClient contains the methods for the ManagedNetworks group. Don't use this type directly, use NewManagedNetworksClient() instead.
func NewManagedNetworksClient ¶
func NewManagedNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedNetworksClient, error)
NewManagedNetworksClient creates a new instance of ManagedNetworksClient with the specified values.
- subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ManagedNetworksClient) BeginDelete ¶
func (client *ManagedNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, managedNetworkName string, options *ManagedNetworksClientBeginDeleteOptions) (*runtime.Poller[ManagedNetworksClientDeleteResponse], error)
BeginDelete - The Delete ManagedNetworks operation deletes a Managed Network Resource, specified by the resource group and Managed Network name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- options - ManagedNetworksClientBeginDeleteOptions contains the optional parameters for the ManagedNetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetwork/ManagedNetworksDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedNetworksClient().BeginDelete(ctx, "myResourceGroup", "myManagedNetwork", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ManagedNetworksClient) BeginUpdate ¶
func (client *ManagedNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, parameters Update, options *ManagedNetworksClientBeginUpdateOptions) (*runtime.Poller[ManagedNetworksClientUpdateResponse], error)
BeginUpdate - Updates the specified Managed Network resource tags. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- parameters - Parameters supplied to update application gateway tags and/or scope.
- options - ManagedNetworksClientBeginUpdateOptions contains the optional parameters for the ManagedNetworksClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetwork/ManagedNetworksPatch.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewManagedNetworksClient().BeginUpdate(ctx, "myResourceGroup", "myManagedNetwork", armmanagednetwork.Update{ Tags: map[string]*string{}, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedNetwork = armmanagednetwork.ManagedNetwork{ // Name: to.Ptr("myManagedNetwork"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworks"), // ID: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armmanagednetwork.Properties{ // Etag: to.Ptr("sadf-asdf-asdf-asdf"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Connectivity: &armmanagednetwork.ConnectivityCollection{ // Groups: []*armmanagednetwork.Group{ // }, // Peerings: []*armmanagednetwork.PeeringPolicy{ // }, // }, // Scope: &armmanagednetwork.Scope{ // ManagementGroups: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), // }, // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000"), // }}, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetB"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("subscriptionA"), // }, // { // ID: to.Ptr("subscriptionB"), // }}, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // }, // } }
Output:
func (*ManagedNetworksClient) CreateOrUpdate ¶
func (client *ManagedNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetwork ManagedNetwork, options *ManagedNetworksClientCreateOrUpdateOptions) (ManagedNetworksClientCreateOrUpdateResponse, error)
CreateOrUpdate - The Put ManagedNetworks operation creates/updates a Managed Network Resource, specified by resource group and Managed Network name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- managedNetwork - Parameters supplied to the create/update a Managed Network Resource
- options - ManagedNetworksClientCreateOrUpdateOptions contains the optional parameters for the ManagedNetworksClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetwork/ManagedNetworksPut.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/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedNetworksClient().CreateOrUpdate(ctx, "myResourceGroup", "myManagedNetwork", armmanagednetwork.ManagedNetwork{ Location: to.Ptr("eastus"), Tags: map[string]*string{}, Properties: &armmanagednetwork.Properties{ Scope: &armmanagednetwork.Scope{ ManagementGroups: []*armmanagednetwork.ResourceID{ { ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), }, { ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000"), }}, Subnets: []*armmanagednetwork.ResourceID{ { ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetA"), }, { ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetB"), }}, Subscriptions: []*armmanagednetwork.ResourceID{ { ID: to.Ptr("subscriptionA"), }, { ID: to.Ptr("subscriptionB"), }}, VirtualNetworks: []*armmanagednetwork.ResourceID{ { ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), }, { ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), }}, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedNetwork = armmanagednetwork.ManagedNetwork{ // Name: to.Ptr("myManagedNetwork"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworks"), // ID: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armmanagednetwork.Properties{ // Etag: to.Ptr("sadf-asdf-asdf-asdf"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Connectivity: &armmanagednetwork.ConnectivityCollection{ // Groups: []*armmanagednetwork.Group{ // }, // Peerings: []*armmanagednetwork.PeeringPolicy{ // }, // }, // Scope: &armmanagednetwork.Scope{ // ManagementGroups: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), // }, // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000"), // }}, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetB"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("subscriptionA"), // }, // { // ID: to.Ptr("subscriptionB"), // }}, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // }, // } }
Output:
func (*ManagedNetworksClient) Get ¶
func (client *ManagedNetworksClient) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, options *ManagedNetworksClientGetOptions) (ManagedNetworksClientGetResponse, error)
Get - The Get ManagedNetworks operation gets a Managed Network Resource, specified by the resource group and Managed Network name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- options - ManagedNetworksClientGetOptions contains the optional parameters for the ManagedNetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetwork/ManagedNetworksGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewManagedNetworksClient().Get(ctx, "myResourceGroup", "myManagedNetwork", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ManagedNetwork = armmanagednetwork.ManagedNetwork{ // Name: to.Ptr("myManagedNetwork"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworks"), // ID: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armmanagednetwork.Properties{ // Etag: to.Ptr("sadf-asdf-asdf-asdf"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Connectivity: &armmanagednetwork.ConnectivityCollection{ // Groups: []*armmanagednetwork.Group{ // }, // Peerings: []*armmanagednetwork.PeeringPolicy{ // }, // }, // Scope: &armmanagednetwork.Scope{ // ManagementGroups: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), // }, // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000"), // }}, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetB"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("subscriptionA"), // }, // { // ID: to.Ptr("subscriptionB"), // }}, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // }, // } }
Output:
func (*ManagedNetworksClient) NewListByResourceGroupPager ¶
func (client *ManagedNetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedNetworksClientListByResourceGroupOptions) *runtime.Pager[ManagedNetworksClientListByResourceGroupResponse]
NewListByResourceGroupPager - The ListByResourceGroup ManagedNetwork operation retrieves all the Managed Network resources in a resource group in a paginated format.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- options - ManagedNetworksClientListByResourceGroupOptions contains the optional parameters for the ManagedNetworksClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetwork/ManagedNetworksListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedNetworksClient().NewListByResourceGroupPager("myResourceGroup", &armmanagednetwork.ManagedNetworksClientListByResourceGroupOptions{Top: nil, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListResult = armmanagednetwork.ListResult{ // Value: []*armmanagednetwork.ManagedNetwork{ // { // Name: to.Ptr("myManagedNetwork"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworks"), // ID: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armmanagednetwork.Properties{ // Etag: to.Ptr("sadf-asdf-asdf-asdf"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Connectivity: &armmanagednetwork.ConnectivityCollection{ // Groups: []*armmanagednetwork.Group{ // }, // Peerings: []*armmanagednetwork.PeeringPolicy{ // }, // }, // Scope: &armmanagednetwork.Scope{ // ManagementGroups: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), // }, // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000"), // }}, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetB"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("subscriptionA"), // }, // { // ID: to.Ptr("subscriptionB"), // }}, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // }, // }}, // } } }
Output:
func (*ManagedNetworksClient) NewListBySubscriptionPager ¶
func (client *ManagedNetworksClient) NewListBySubscriptionPager(options *ManagedNetworksClientListBySubscriptionOptions) *runtime.Pager[ManagedNetworksClientListBySubscriptionResponse]
NewListBySubscriptionPager - The ListBySubscription ManagedNetwork operation retrieves all the Managed Network Resources in the current subscription in a paginated format.
Generated from API version 2019-06-01-preview
- options - ManagedNetworksClientListBySubscriptionOptions contains the optional parameters for the ManagedNetworksClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetwork/ManagedNetworksListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewManagedNetworksClient().NewListBySubscriptionPager(&armmanagednetwork.ManagedNetworksClientListBySubscriptionOptions{Top: nil, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ListResult = armmanagednetwork.ListResult{ // Value: []*armmanagednetwork.ManagedNetwork{ // { // Name: to.Ptr("myManagedNetwork"), // Type: to.Ptr("Microsoft.ManagedNetwork/managedNetworks"), // ID: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // Location: to.Ptr("eastus"), // Tags: map[string]*string{ // }, // Properties: &armmanagednetwork.Properties{ // Etag: to.Ptr("sadf-asdf-asdf-asdf"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Connectivity: &armmanagednetwork.ConnectivityCollection{ // Groups: []*armmanagednetwork.Group{ // }, // Peerings: []*armmanagednetwork.PeeringPolicy{ // }, // }, // Scope: &armmanagednetwork.Scope{ // ManagementGroups: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000"), // }, // { // ID: to.Ptr("/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000"), // }}, // Subnets: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetC/subnets/subnetB"), // }}, // Subscriptions: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("subscriptionA"), // }, // { // ID: to.Ptr("subscriptionB"), // }}, // VirtualNetworks: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetA"), // }, // { // ID: to.Ptr("/subscriptions/subscriptionC/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/VnetB"), // }}, // }, // }, // }}, // } } }
Output:
type ManagedNetworksClientBeginDeleteOptions ¶
type ManagedNetworksClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedNetworksClientBeginDeleteOptions contains the optional parameters for the ManagedNetworksClient.BeginDelete method.
type ManagedNetworksClientBeginUpdateOptions ¶
type ManagedNetworksClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ManagedNetworksClientBeginUpdateOptions contains the optional parameters for the ManagedNetworksClient.BeginUpdate method.
type ManagedNetworksClientCreateOrUpdateOptions ¶
type ManagedNetworksClientCreateOrUpdateOptions struct { }
ManagedNetworksClientCreateOrUpdateOptions contains the optional parameters for the ManagedNetworksClient.CreateOrUpdate method.
type ManagedNetworksClientCreateOrUpdateResponse ¶
type ManagedNetworksClientCreateOrUpdateResponse struct { // The Managed Network resource ManagedNetwork }
ManagedNetworksClientCreateOrUpdateResponse contains the response from method ManagedNetworksClient.CreateOrUpdate.
type ManagedNetworksClientDeleteResponse ¶
type ManagedNetworksClientDeleteResponse struct { }
ManagedNetworksClientDeleteResponse contains the response from method ManagedNetworksClient.BeginDelete.
type ManagedNetworksClientGetOptions ¶
type ManagedNetworksClientGetOptions struct { }
ManagedNetworksClientGetOptions contains the optional parameters for the ManagedNetworksClient.Get method.
type ManagedNetworksClientGetResponse ¶
type ManagedNetworksClientGetResponse struct { // The Managed Network resource ManagedNetwork }
ManagedNetworksClientGetResponse contains the response from method ManagedNetworksClient.Get.
type ManagedNetworksClientListByResourceGroupOptions ¶
type ManagedNetworksClientListByResourceGroupOptions struct { // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skiptoken parameter that // specifies a starting point to use for subsequent calls. Skiptoken *string // May be used to limit the number of results in a page for list queries. Top *int32 }
ManagedNetworksClientListByResourceGroupOptions contains the optional parameters for the ManagedNetworksClient.NewListByResourceGroupPager method.
type ManagedNetworksClientListByResourceGroupResponse ¶
type ManagedNetworksClientListByResourceGroupResponse struct { // Result of the request to list Managed Network. It contains a list of Managed Networks and a URL link to get the next set // of results. ListResult }
ManagedNetworksClientListByResourceGroupResponse contains the response from method ManagedNetworksClient.NewListByResourceGroupPager.
type ManagedNetworksClientListBySubscriptionOptions ¶
type ManagedNetworksClientListBySubscriptionOptions struct { // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skiptoken parameter that // specifies a starting point to use for subsequent calls. Skiptoken *string // May be used to limit the number of results in a page for list queries. Top *int32 }
ManagedNetworksClientListBySubscriptionOptions contains the optional parameters for the ManagedNetworksClient.NewListBySubscriptionPager method.
type ManagedNetworksClientListBySubscriptionResponse ¶
type ManagedNetworksClientListBySubscriptionResponse struct { // Result of the request to list Managed Network. It contains a list of Managed Networks and a URL link to get the next set // of results. ListResult }
ManagedNetworksClientListBySubscriptionResponse contains the response from method ManagedNetworksClient.NewListBySubscriptionPager.
type ManagedNetworksClientUpdateResponse ¶
type ManagedNetworksClientUpdateResponse struct { // The Managed Network resource ManagedNetwork }
ManagedNetworksClientUpdateResponse contains the response from method ManagedNetworksClient.BeginUpdate.
type MeshPeeringPolicyProperties ¶
type MeshPeeringPolicyProperties struct { // REQUIRED; Gets or sets the connectivity type of a network structure policy Type *Type // Gets or sets the hub virtual network ID Hub *ResourceID // Gets or sets the mesh group IDs Mesh []*ResourceID // Gets or sets the spokes group IDs Spokes []*ResourceID // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Provisioning state of the ManagedNetwork resource. ProvisioningState *ProvisioningState }
MeshPeeringPolicyProperties - Properties of a Mesh Peering Policy
func (MeshPeeringPolicyProperties) MarshalJSON ¶
func (m MeshPeeringPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type MeshPeeringPolicyProperties.
func (*MeshPeeringPolicyProperties) UnmarshalJSON ¶ added in v0.2.0
func (m *MeshPeeringPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type MeshPeeringPolicyProperties.
type Operation ¶
type Operation struct { // The object that represents the operation. Display *OperationDisplay // Operation name: {provider}/{resource}/{operation} Name *string }
Operation - REST API operation
func (Operation) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // Operation type: Read, write, delete, etc. Operation *string // Service provider: Microsoft.ManagedNetwork Provider *string // Resource on which the operation is performed: Profile, endpoint, etc. Resource *string }
OperationDisplay - The object that represents the operation.
func (OperationDisplay) MarshalJSON ¶ added in v0.2.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // URL to get the next set of operation list results if there are any. NextLink *string // List of Resource Provider operations supported by the Managed Network resource provider. Value []*Operation }
OperationListResult - Result of the request to list Managed Network operations. It contains a list of operations and a URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶ added in v0.2.0
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v0.2.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
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 ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - Lists all of the available MNC operations.
Generated from API version 2019-06-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct { // Result of the request to list Managed Network operations. It contains a list of operations and a URL link to get the next // set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.NewListPager.
type PeeringPoliciesClient ¶
type PeeringPoliciesClient struct {
// contains filtered or unexported fields
}
PeeringPoliciesClient contains the methods for the ManagedNetworkPeeringPolicies group. Don't use this type directly, use NewPeeringPoliciesClient() instead.
func NewPeeringPoliciesClient ¶
func NewPeeringPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PeeringPoliciesClient, error)
NewPeeringPoliciesClient creates a new instance of PeeringPoliciesClient with the specified values.
- subscriptionID - Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*PeeringPoliciesClient) BeginCreateOrUpdate ¶
func (client *PeeringPoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkPeeringPolicyName string, managedNetworkPolicy PeeringPolicy, options *PeeringPoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PeeringPoliciesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - The Put ManagedNetworkPeeringPolicies operation creates/updates a new Managed Network Peering Policy If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- managedNetworkPeeringPolicyName - The name of the Managed Network Peering Policy.
- managedNetworkPolicy - Parameters supplied to create/update a Managed Network Peering Policy
- options - PeeringPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PeeringPoliciesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkPeeringPolicy/ManagedNetworkPeeringPoliciesPut.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/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPeeringPoliciesClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myManagedNetwork", "myHubAndSpoke", armmanagednetwork.PeeringPolicy{ Properties: &armmanagednetwork.PeeringPolicyProperties{ Type: to.Ptr(armmanagednetwork.TypeHubAndSpokeTopology), Hub: &armmanagednetwork.ResourceID{ ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"), }, Spokes: []*armmanagednetwork.ResourceID{ { ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"), }}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PeeringPolicy = armmanagednetwork.PeeringPolicy{ // Name: to.Ptr("myHubAndSpoke"), // Type: to.Ptr("Microsoft.ManagedNetwork/peeringPolicies"), // ID: to.Ptr("/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkPeeringPolicies/myHubAndSpoke"), // Properties: &armmanagednetwork.PeeringPolicyProperties{ // Etag: to.Ptr("asdf-asdf-asdf2"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Type: to.Ptr(armmanagednetwork.TypeHubAndSpokeTopology), // Hub: &armmanagednetwork.ResourceID{ // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"), // }, // Spokes: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"), // }}, // }, // } }
Output:
func (*PeeringPoliciesClient) BeginDelete ¶
func (client *PeeringPoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkPeeringPolicyName string, options *PeeringPoliciesClientBeginDeleteOptions) (*runtime.Poller[PeeringPoliciesClientDeleteResponse], error)
BeginDelete - The Delete ManagedNetworkPeeringPolicies operation deletes a Managed Network Peering Policy, specified by the resource group, Managed Network name, and peering policy name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- managedNetworkPeeringPolicyName - The name of the Managed Network Peering Policy.
- options - PeeringPoliciesClientBeginDeleteOptions contains the optional parameters for the PeeringPoliciesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkPeeringPolicy/ManagedNetworkPeeringPoliciesDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewPeeringPoliciesClient().BeginDelete(ctx, "myResourceGroup", "myManagedNetwork", "myHubAndSpoke", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*PeeringPoliciesClient) Get ¶
func (client *PeeringPoliciesClient) Get(ctx context.Context, resourceGroupName string, managedNetworkName string, managedNetworkPeeringPolicyName string, options *PeeringPoliciesClientGetOptions) (PeeringPoliciesClientGetResponse, error)
Get - The Get ManagedNetworkPeeringPolicies operation gets a Managed Network Peering Policy resource, specified by the resource group, Managed Network name, and peering policy name If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- managedNetworkPeeringPolicyName - The name of the Managed Network Peering Policy.
- options - PeeringPoliciesClientGetOptions contains the optional parameters for the PeeringPoliciesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkPeeringPolicy/ManagedNetworkPeeringPoliciesGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewPeeringPoliciesClient().Get(ctx, "myResourceGroup", "myManagedNetwork", "myHubAndSpoke", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PeeringPolicy = armmanagednetwork.PeeringPolicy{ // Name: to.Ptr("myHubAndSpoke"), // Type: to.Ptr("Microsoft.ManagedNetwork/peeringPolicies"), // ID: to.Ptr("/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkPeeringPolicies/myHubAndSpoke"), // Properties: &armmanagednetwork.PeeringPolicyProperties{ // Etag: to.Ptr("asdf-asdf-asdf2"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Type: to.Ptr(armmanagednetwork.TypeHubAndSpokeTopology), // Hub: &armmanagednetwork.ResourceID{ // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"), // }, // Spokes: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"), // }}, // }, // } }
Output:
func (*PeeringPoliciesClient) NewListByManagedNetworkPager ¶
func (client *PeeringPoliciesClient) NewListByManagedNetworkPager(resourceGroupName string, managedNetworkName string, options *PeeringPoliciesClientListByManagedNetworkOptions) *runtime.Pager[PeeringPoliciesClientListByManagedNetworkResponse]
NewListByManagedNetworkPager - The ListByManagedNetwork PeeringPolicies operation retrieves all the Managed Network Peering Policies in a specified Managed Network, in a paginated format.
Generated from API version 2019-06-01-preview
- resourceGroupName - The name of the resource group.
- managedNetworkName - The name of the Managed Network.
- options - PeeringPoliciesClientListByManagedNetworkOptions contains the optional parameters for the PeeringPoliciesClient.NewListByManagedNetworkPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ManagedNetworkPeeringPolicy/ManagedNetworkPeeringPoliciesListByManagedNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewPeeringPoliciesClient().NewListByManagedNetworkPager("myResourceGroup", "myManagedNetwork", &armmanagednetwork.PeeringPoliciesClientListByManagedNetworkOptions{Top: nil, Skiptoken: nil, }) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.PeeringPolicyListResult = armmanagednetwork.PeeringPolicyListResult{ // Value: []*armmanagednetwork.PeeringPolicy{ // { // Name: to.Ptr("myHubAndSpoke"), // Type: to.Ptr("Microsoft.ManagedNetwork/peeringPolicies"), // ID: to.Ptr("/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkPeeringPolicies/myHubAndSpoke"), // Properties: &armmanagednetwork.PeeringPolicyProperties{ // Etag: to.Ptr("asdf-asdf-asdf2"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // Type: to.Ptr(armmanagednetwork.TypeHubAndSpokeTopology), // Hub: &armmanagednetwork.ResourceID{ // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"), // }, // Spokes: []*armmanagednetwork.ResourceID{ // { // ID: to.Ptr("/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork/managedNetworkGroups/myManagedNetworkGroup1"), // }}, // }, // }}, // } } }
Output:
type PeeringPoliciesClientBeginCreateOrUpdateOptions ¶
type PeeringPoliciesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PeeringPoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PeeringPoliciesClient.BeginCreateOrUpdate method.
type PeeringPoliciesClientBeginDeleteOptions ¶
type PeeringPoliciesClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
PeeringPoliciesClientBeginDeleteOptions contains the optional parameters for the PeeringPoliciesClient.BeginDelete method.
type PeeringPoliciesClientCreateOrUpdateResponse ¶
type PeeringPoliciesClientCreateOrUpdateResponse struct { // The Managed Network Peering Policy resource PeeringPolicy }
PeeringPoliciesClientCreateOrUpdateResponse contains the response from method PeeringPoliciesClient.BeginCreateOrUpdate.
type PeeringPoliciesClientDeleteResponse ¶
type PeeringPoliciesClientDeleteResponse struct { }
PeeringPoliciesClientDeleteResponse contains the response from method PeeringPoliciesClient.BeginDelete.
type PeeringPoliciesClientGetOptions ¶
type PeeringPoliciesClientGetOptions struct { }
PeeringPoliciesClientGetOptions contains the optional parameters for the PeeringPoliciesClient.Get method.
type PeeringPoliciesClientGetResponse ¶
type PeeringPoliciesClientGetResponse struct { // The Managed Network Peering Policy resource PeeringPolicy }
PeeringPoliciesClientGetResponse contains the response from method PeeringPoliciesClient.Get.
type PeeringPoliciesClientListByManagedNetworkOptions ¶
type PeeringPoliciesClientListByManagedNetworkOptions struct { // Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, // the value of the nextLink element will include a skiptoken parameter that // specifies a starting point to use for subsequent calls. Skiptoken *string // May be used to limit the number of results in a page for list queries. Top *int32 }
PeeringPoliciesClientListByManagedNetworkOptions contains the optional parameters for the PeeringPoliciesClient.NewListByManagedNetworkPager method.
type PeeringPoliciesClientListByManagedNetworkResponse ¶
type PeeringPoliciesClientListByManagedNetworkResponse struct { // Result of the request to list Managed Network Peering Policies. It contains a list of policies and a URL link to get the // next set of results. PeeringPolicyListResult }
PeeringPoliciesClientListByManagedNetworkResponse contains the response from method PeeringPoliciesClient.NewListByManagedNetworkPager.
type PeeringPolicy ¶
type PeeringPolicy struct { // The geo-location where the resource lives Location *string // Gets or sets the properties of a Managed Network Policy Properties *PeeringPolicyProperties // READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
PeeringPolicy - The Managed Network Peering Policy resource
func (PeeringPolicy) MarshalJSON ¶ added in v0.2.0
func (p PeeringPolicy) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PeeringPolicy.
func (*PeeringPolicy) UnmarshalJSON ¶ added in v0.2.0
func (p *PeeringPolicy) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PeeringPolicy.
type PeeringPolicyListResult ¶
type PeeringPolicyListResult struct { // Gets the URL to get the next page of results. NextLink *string // Gets a page of Peering Policies Value []*PeeringPolicy }
PeeringPolicyListResult - Result of the request to list Managed Network Peering Policies. It contains a list of policies and a URL link to get the next set of results.
func (PeeringPolicyListResult) MarshalJSON ¶ added in v0.2.0
func (p PeeringPolicyListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PeeringPolicyListResult.
func (*PeeringPolicyListResult) UnmarshalJSON ¶ added in v0.2.0
func (p *PeeringPolicyListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PeeringPolicyListResult.
type PeeringPolicyProperties ¶
type PeeringPolicyProperties struct { // REQUIRED; Gets or sets the connectivity type of a network structure policy Type *Type // Gets or sets the hub virtual network ID Hub *ResourceID // Gets or sets the mesh group IDs Mesh []*ResourceID // Gets or sets the spokes group IDs Spokes []*ResourceID // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Provisioning state of the ManagedNetwork resource. ProvisioningState *ProvisioningState }
PeeringPolicyProperties - Properties of a Managed Network Peering Policy
func (PeeringPolicyProperties) MarshalJSON ¶
func (p PeeringPolicyProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PeeringPolicyProperties.
func (*PeeringPolicyProperties) UnmarshalJSON ¶ added in v0.2.0
func (p *PeeringPolicyProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PeeringPolicyProperties.
type Properties ¶
type Properties struct { // The collection of management groups, subscriptions, virtual networks, and subnets by the Managed Network. This is a read-only // property that is reflective of all ScopeAssignments for this Managed // Network Scope *Scope // READ-ONLY; The collection of groups and policies concerned with connectivity Connectivity *ConnectivityCollection // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Provisioning state of the ManagedNetwork resource. ProvisioningState *ProvisioningState }
Properties of Managed Network
func (Properties) MarshalJSON ¶ added in v0.2.0
func (p Properties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type Properties.
func (*Properties) UnmarshalJSON ¶ added in v0.2.0
func (p *Properties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type Properties.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Provisioning state of the ManagedNetwork 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 ProxyResource ¶
type ProxyResource struct { // The geo-location where the resource lives Location *string // READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
ProxyResource - The resource model definition for a ARM proxy resource. It will have everything other than required location and tags
func (ProxyResource) MarshalJSON ¶ added in v0.2.0
func (p ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ProxyResource.
func (*ProxyResource) UnmarshalJSON ¶ added in v0.2.0
func (p *ProxyResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.
type Resource ¶
type Resource struct { // The geo-location where the resource lives Location *string // READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
Resource - The general resource model definition
func (Resource) MarshalJSON ¶ added in v0.2.0
MarshalJSON implements the json.Marshaller interface for type Resource.
func (*Resource) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Resource.
type ResourceID ¶
type ResourceID struct { // Resource Id ID *string }
ResourceID - Generic pointer to a resource
func (ResourceID) MarshalJSON ¶ added in v0.2.0
func (r ResourceID) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceID.
func (*ResourceID) UnmarshalJSON ¶ added in v0.2.0
func (r *ResourceID) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceID.
type ResourceProperties ¶
type ResourceProperties struct { // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Provisioning state of the ManagedNetwork resource. ProvisioningState *ProvisioningState }
ResourceProperties - Base for resource properties.
func (ResourceProperties) MarshalJSON ¶ added in v0.2.0
func (r ResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourceProperties.
func (*ResourceProperties) UnmarshalJSON ¶ added in v0.2.0
func (r *ResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ResourceProperties.
type Scope ¶
type Scope struct { // The collection of management groups covered by the Managed Network ManagementGroups []*ResourceID // The collection of subnets covered by the Managed Network Subnets []*ResourceID // The collection of subscriptions covered by the Managed Network Subscriptions []*ResourceID // The collection of virtual nets covered by the Managed Network VirtualNetworks []*ResourceID }
Scope of a Managed Network
func (Scope) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Scope.
func (*Scope) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Scope.
type ScopeAssignment ¶
type ScopeAssignment struct { // The geo-location where the resource lives Location *string // The Scope Assignment properties Properties *ScopeAssignmentProperties // READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
ScopeAssignment - The Managed Network resource
func (ScopeAssignment) MarshalJSON ¶ added in v0.2.0
func (s ScopeAssignment) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScopeAssignment.
func (*ScopeAssignment) UnmarshalJSON ¶ added in v0.2.0
func (s *ScopeAssignment) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeAssignment.
type ScopeAssignmentListResult ¶
type ScopeAssignmentListResult struct { // Gets the URL to get the next set of results. NextLink *string // Gets a page of ScopeAssignment Value []*ScopeAssignment }
ScopeAssignmentListResult - Result of the request to list ScopeAssignment. It contains a list of groups and a URL link to get the next set of results.
func (ScopeAssignmentListResult) MarshalJSON ¶ added in v0.2.0
func (s ScopeAssignmentListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScopeAssignmentListResult.
func (*ScopeAssignmentListResult) UnmarshalJSON ¶ added in v0.2.0
func (s *ScopeAssignmentListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeAssignmentListResult.
type ScopeAssignmentProperties ¶
type ScopeAssignmentProperties struct { // The managed network ID with scope will be assigned to. AssignedManagedNetwork *string // READ-ONLY; A unique read-only string that changes whenever the resource is updated. Etag *string // READ-ONLY; Provisioning state of the ManagedNetwork resource. ProvisioningState *ProvisioningState }
ScopeAssignmentProperties - Properties of Managed Network
func (ScopeAssignmentProperties) MarshalJSON ¶ added in v0.2.0
func (s ScopeAssignmentProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ScopeAssignmentProperties.
func (*ScopeAssignmentProperties) UnmarshalJSON ¶ added in v0.2.0
func (s *ScopeAssignmentProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ScopeAssignmentProperties.
type ScopeAssignmentsClient ¶
type ScopeAssignmentsClient struct {
// contains filtered or unexported fields
}
ScopeAssignmentsClient contains the methods for the ScopeAssignments group. Don't use this type directly, use NewScopeAssignmentsClient() instead.
func NewScopeAssignmentsClient ¶
func NewScopeAssignmentsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*ScopeAssignmentsClient, error)
NewScopeAssignmentsClient creates a new instance of ScopeAssignmentsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ScopeAssignmentsClient) CreateOrUpdate ¶
func (client *ScopeAssignmentsClient) CreateOrUpdate(ctx context.Context, scope string, scopeAssignmentName string, parameters ScopeAssignment, options *ScopeAssignmentsClientCreateOrUpdateOptions) (ScopeAssignmentsClientCreateOrUpdateResponse, error)
CreateOrUpdate - Creates a scope assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- scope - The base resource of the scope assignment to create. The scope can be any REST resource instance. For example, use 'subscriptions/{subscription-id}' for a subscription, 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and 'subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
- scopeAssignmentName - The name of the scope assignment to create.
- parameters - Parameters supplied to the specify which Managed Network this scope is being assigned
- options - ScopeAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ScopeAssignmentsClient.CreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ScopeAssignment/ScopeAssignmentsPut.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/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScopeAssignmentsClient().CreateOrUpdate(ctx, "subscriptions/subscriptionC", "subscriptionCAssignment", armmanagednetwork.ScopeAssignment{ Properties: &armmanagednetwork.ScopeAssignmentProperties{ AssignedManagedNetwork: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScopeAssignment = armmanagednetwork.ScopeAssignment{ // Name: to.Ptr("subscriptionCAssignment"), // Type: to.Ptr("Microsoft.ManagedNetwork/scopeAssignment"), // ID: to.Ptr("/subscriptions/subscriptionC/providers/Microsoft.ManagedNetwork/scopeAssignments/subscriptionCAssignment"), // Properties: &armmanagednetwork.ScopeAssignmentProperties{ // Etag: to.Ptr("sadf-asdf-asdf-asdf"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // AssignedManagedNetwork: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // }, // } }
Output:
func (*ScopeAssignmentsClient) Delete ¶
func (client *ScopeAssignmentsClient) Delete(ctx context.Context, scope string, scopeAssignmentName string, options *ScopeAssignmentsClientDeleteOptions) (ScopeAssignmentsClientDeleteResponse, error)
Delete - Deletes a scope assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- scope - The scope of the scope assignment to delete.
- scopeAssignmentName - The name of the scope assignment to delete.
- options - ScopeAssignmentsClientDeleteOptions contains the optional parameters for the ScopeAssignmentsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ScopeAssignment/ScopeAssignmentsDelete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = clientFactory.NewScopeAssignmentsClient().Delete(ctx, "subscriptions/subscriptionC", "subscriptionCAssignment", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*ScopeAssignmentsClient) Get ¶
func (client *ScopeAssignmentsClient) Get(ctx context.Context, scope string, scopeAssignmentName string, options *ScopeAssignmentsClientGetOptions) (ScopeAssignmentsClientGetResponse, error)
Get - Get the specified scope assignment. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2019-06-01-preview
- scope - The base resource of the scope assignment.
- scopeAssignmentName - The name of the scope assignment to get.
- options - ScopeAssignmentsClientGetOptions contains the optional parameters for the ScopeAssignmentsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ScopeAssignment/ScopeAssignmentsGet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewScopeAssignmentsClient().Get(ctx, "subscriptions/subscriptionC", "subscriptionCAssignment", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ScopeAssignment = armmanagednetwork.ScopeAssignment{ // Name: to.Ptr("subscriptionCAssignment"), // Type: to.Ptr("Microsoft.ManagedNetwork/scopeAssignment"), // ID: to.Ptr("/subscriptions/subscriptionC/providers/Microsoft.ManagedNetwork/scopeAssignments/subscriptionCAssignment"), // Properties: &armmanagednetwork.ScopeAssignmentProperties{ // AssignedManagedNetwork: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // }, // } }
Output:
func (*ScopeAssignmentsClient) NewListPager ¶
func (client *ScopeAssignmentsClient) NewListPager(scope string, options *ScopeAssignmentsClientListOptions) *runtime.Pager[ScopeAssignmentsClientListResponse]
NewListPager - Get the specified scope assignment.
Generated from API version 2019-06-01-preview
- scope - The base resource of the scope assignment.
- options - ScopeAssignmentsClientListOptions contains the optional parameters for the ScopeAssignmentsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/163e27c0ca7570bc39e00a46f255740d9b3ba3cb/specification/managednetwork/resource-manager/Microsoft.ManagedNetwork/preview/2019-06-01-preview/examples/ScopeAssignment/ScopeAssignmentsList.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/managednetwork/armmanagednetwork" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armmanagednetwork.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewScopeAssignmentsClient().NewListPager("subscriptions/subscriptionC", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ScopeAssignmentListResult = armmanagednetwork.ScopeAssignmentListResult{ // Value: []*armmanagednetwork.ScopeAssignment{ // { // Name: to.Ptr("subscriptionCAssignemnt"), // Type: to.Ptr("Microsoft.ManagedNetwork/scopeAssignment"), // ID: to.Ptr("/subscriptions/subscriptionC/providers/Microsoft.ManagedNetwork/scopeAssignments/subscriptionCAssignment"), // Properties: &armmanagednetwork.ScopeAssignmentProperties{ // Etag: to.Ptr("sadf-asdf-asdf-asdf"), // ProvisioningState: to.Ptr(armmanagednetwork.ProvisioningStateSucceeded), // AssignedManagedNetwork: to.Ptr("/subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork"), // }, // }}, // } } }
Output:
type ScopeAssignmentsClientCreateOrUpdateOptions ¶
type ScopeAssignmentsClientCreateOrUpdateOptions struct { }
ScopeAssignmentsClientCreateOrUpdateOptions contains the optional parameters for the ScopeAssignmentsClient.CreateOrUpdate method.
type ScopeAssignmentsClientCreateOrUpdateResponse ¶
type ScopeAssignmentsClientCreateOrUpdateResponse struct { // The Managed Network resource ScopeAssignment }
ScopeAssignmentsClientCreateOrUpdateResponse contains the response from method ScopeAssignmentsClient.CreateOrUpdate.
type ScopeAssignmentsClientDeleteOptions ¶
type ScopeAssignmentsClientDeleteOptions struct { }
ScopeAssignmentsClientDeleteOptions contains the optional parameters for the ScopeAssignmentsClient.Delete method.
type ScopeAssignmentsClientDeleteResponse ¶
type ScopeAssignmentsClientDeleteResponse struct { }
ScopeAssignmentsClientDeleteResponse contains the response from method ScopeAssignmentsClient.Delete.
type ScopeAssignmentsClientGetOptions ¶
type ScopeAssignmentsClientGetOptions struct { }
ScopeAssignmentsClientGetOptions contains the optional parameters for the ScopeAssignmentsClient.Get method.
type ScopeAssignmentsClientGetResponse ¶
type ScopeAssignmentsClientGetResponse struct { // The Managed Network resource ScopeAssignment }
ScopeAssignmentsClientGetResponse contains the response from method ScopeAssignmentsClient.Get.
type ScopeAssignmentsClientListOptions ¶
type ScopeAssignmentsClientListOptions struct { }
ScopeAssignmentsClientListOptions contains the optional parameters for the ScopeAssignmentsClient.NewListPager method.
type ScopeAssignmentsClientListResponse ¶
type ScopeAssignmentsClientListResponse struct { // Result of the request to list ScopeAssignment. It contains a list of groups and a URL link to get the next set of results. ScopeAssignmentListResult }
ScopeAssignmentsClientListResponse contains the response from method ScopeAssignmentsClient.NewListPager.
type TrackedResource ¶
type TrackedResource struct { // The geo-location where the resource lives Location *string // Resource tags Tags map[string]*string // READ-ONLY; Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string }
TrackedResource - The resource model definition for a ARM tracked top level resource
func (TrackedResource) MarshalJSON ¶
func (t TrackedResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type TrackedResource.
func (*TrackedResource) UnmarshalJSON ¶ added in v0.2.0
func (t *TrackedResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.
type Type ¶
type Type string
Type - Gets or sets the connectivity type of a network structure policy
func PossibleTypeValues ¶
func PossibleTypeValues() []Type
PossibleTypeValues returns the possible values for the Type const type.
type Update ¶
Update Tags of Managed Network
func (Update) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Update.
func (*Update) UnmarshalJSON ¶ added in v0.2.0
UnmarshalJSON implements the json.Unmarshaller interface for type Update.