Načte podrobnosti o portu poskytovatele.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}?api-version=2023-09-01
Parametry identifikátoru URI
Name |
V |
Vyžadováno |
Typ |
Description |
providerport
|
path |
True
|
string
|
Název portu poskytovatele.
|
subscriptionId
|
path |
True
|
string
|
Přihlašovací údaje předplatného, které jednoznačně identifikují předplatné Microsoft Azure. ID předplatného je součástí identifikátoru URI pro každé volání služby.
|
api-version
|
query |
True
|
string
|
Verze rozhraní API klienta.
|
Odpovědi
Name |
Typ |
Description |
200 OK
|
ExpressRouteProviderPort
|
Žádost byla úspěšná. Operace vrátí podrobnosti o prostředcích portu jednotlivých zprostředkovatelů. Pokud žádný port neexistuje, vrátí se prázdný výsledek.
|
Other Status Codes
|
CloudError
|
Chybová odpověď popisující, proč operace selhala.
|
Zabezpečení
azure_auth
Tok Azure Active Directory OAuth2.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
zosobnění uživatelského účtu
|
Příklady
ExpressRouteProviderPort
Sample Request
GET https://management.azure.com/subscriptions/subid/providers/Microsoft.Network/expressRouteProviderPorts/abc?api-version=2023-09-01
from azure.identity import DefaultAzureCredential
from azure.mgmt.network import NetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-network
# USAGE
python express_route_provider_port.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = NetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.express_route_provider_port(
providerport="abc",
)
print(response)
# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/expressRouteProviderPort.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/expressRouteProviderPort.json
func ExampleManagementClient_ExpressRouteProviderPort() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewManagementClient().ExpressRouteProviderPort(ctx, "abc", 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.ExpressRouteProviderPort = armnetwork.ExpressRouteProviderPort{
// Type: to.Ptr("Microsoft.Network/expressRouteProviderPort"),
// ID: to.Ptr("/subscriptions/subid/providers/Microsoft.Network/ExpressRoutePortsLocations/SiliconValley/bvtazureixpportpair1"),
// Location: to.Ptr("uswest"),
// Etag: to.Ptr("W/\"c0e6477e-8150-4d4f-9bf6-bb10e6acb63a\""),
// Properties: &armnetwork.ExpressRouteProviderPortProperties{
// OverprovisionFactor: to.Ptr[int32](4),
// PeeringLocation: to.Ptr("SiliconValley"),
// PortBandwidthInMbps: to.Ptr[int32](4000),
// PortPairDescriptor: to.Ptr("bvtazureixpportpair1"),
// PrimaryAzurePort: to.Ptr("bvtazureixp01"),
// RemainingBandwidthInMbps: to.Ptr[int32](1500),
// SecondaryAzurePort: to.Ptr("bvtazureixp01"),
// UsedBandwidthInMbps: to.Ptr[int32](2500),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { NetworkManagementClient } = require("@azure/arm-network");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Retrieves detail of a provider port.
*
* @summary Retrieves detail of a provider port.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/expressRouteProviderPort.json
*/
async function expressRouteProviderPort() {
const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid";
const providerport = "abc";
const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const result = await client.expressRouteProviderPort(providerport);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Network;
using Azure.ResourceManager.Network.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/expressRouteProviderPort.json
// this example is just showing the usage of "ExpressRouteProviderPort" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this ExpressRouteProviderPortResource created on azure
// for more information of creating ExpressRouteProviderPortResource, please refer to the document of ExpressRouteProviderPortResource
string subscriptionId = "subid";
string providerport = "abc";
ResourceIdentifier expressRouteProviderPortResourceId = ExpressRouteProviderPortResource.CreateResourceIdentifier(subscriptionId, providerport);
ExpressRouteProviderPortResource expressRouteProviderPort = client.GetExpressRouteProviderPortResource(expressRouteProviderPortResourceId);
// invoke the operation
ExpressRouteProviderPortResource result = await expressRouteProviderPort.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ExpressRouteProviderPortData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/providers/Microsoft.Network/ExpressRoutePortsLocations/SiliconValley/bvtazureixpportpair1",
"type": "Microsoft.Network/expressRouteProviderPort",
"location": "uswest",
"etag": "W/\"c0e6477e-8150-4d4f-9bf6-bb10e6acb63a\"",
"properties": {
"portPairDescriptor": "bvtazureixpportpair1",
"primaryAzurePort": "bvtazureixp01",
"secondaryAzurePort": "bvtazureixp01",
"peeringLocation": "SiliconValley",
"overprovisionFactor": 4,
"portBandwidthInMbps": 4000,
"usedBandwidthInMbps": 2500,
"remainingBandwidthInMbps": 1500
}
}
Definice
CloudError
Chybová odpověď ze služby.
Name |
Typ |
Description |
error
|
CloudErrorBody
|
Text chyby cloudu.
|
CloudErrorBody
Chybová odpověď ze služby.
Name |
Typ |
Description |
code
|
string
|
Identifikátor chyby. Kódy jsou neutrální a mají být využívány programově.
|
details
|
CloudErrorBody[]
|
Seznam dalších podrobností o chybě
|
message
|
string
|
Zpráva popisující chybu, která má být vhodná k zobrazení v uživatelském rozhraní.
|
target
|
string
|
Cíl konkrétní chyby. Například název vlastnosti v chybě.
|
ExpressRouteProviderPort
Prostředek ExpressRouteProviderPort.
Name |
Typ |
Description |
etag
|
string
|
Jedinečný řetězec jen pro čtení, který se změní při každé aktualizaci prostředku.
|
id
|
string
|
Plně kvalifikované ID prostředku
|
location
|
string
|
Umístění prostředku.
|
name
|
string
|
Název prostředku
|
properties.overprovisionFactor
|
integer
|
Faktor nadměrného zřizování pro dvojici portů
|
properties.peeringLocation
|
string
|
Umístění partnerského vztahu páru portů.
|
properties.portBandwidthInMbps
|
integer
|
Šířka pásma portu v Mb/s
|
properties.portPairDescriptor
|
string
|
Název dvojice portů.
|
properties.primaryAzurePort
|
string
|
Název primárního portu.
|
properties.remainingBandwidthInMbps
|
integer
|
Zbývající šířka pásma portu v Mb/s
|
properties.secondaryAzurePort
|
string
|
Název sekundárního portu.
|
properties.usedBandwidthInMbps
|
integer
|
Využitá šířka pásma portu v Mb/s
|
tags
|
object
|
Značky prostředků.
|
type
|
string
|
Typ prostředku. Například Microsoft.Compute/virtualMachines nebo Microsoft.Storage/storageAccounts
|