Извлекает сведения о порте поставщика.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteProviderPorts/{providerport}?api-version=2023-09-01
Параметры URI
Имя |
В |
Обязательно |
Тип |
Описание |
providerport
|
path |
True
|
string
|
Имя порта поставщика.
|
subscriptionId
|
path |
True
|
string
|
Учетные данные подписки, которые однозначно идентифицируют подписку Microsoft Azure. Идентификатор подписки формирует часть URI для каждого вызова службы.
|
api-version
|
query |
True
|
string
|
Версия API клиента.
|
Ответы
Имя |
Тип |
Описание |
200 OK
|
ExpressRouteProviderPort
|
Запрос выполнен успешно. Операция возвращает подробные сведения о ресурсах портов отдельных поставщиков. Если порт отсутствует, возвращается пустой результат.
|
Other Status Codes
|
CloudError
|
Ответ об ошибке, описывающий причину сбоя операции.
|
Безопасность
azure_auth
Поток OAuth2 в Azure Active Directory.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Имя |
Описание |
user_impersonation
|
олицетворения учетной записи пользователя
|
Примеры
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
}
}
Определения
CloudError
Ответ об ошибке от службы.
Имя |
Тип |
Описание |
error
|
CloudErrorBody
|
Текст ошибки облака.
|
CloudErrorBody
Ответ об ошибке от службы.
Имя |
Тип |
Описание |
code
|
string
|
Идентификатор ошибки. Коды инвариантны и предназначены для программного использования.
|
details
|
CloudErrorBody[]
|
Список дополнительных сведений об ошибке.
|
message
|
string
|
Сообщение, описывающее ошибку, предназначенное для отображения в пользовательском интерфейсе.
|
target
|
string
|
Целевой объект конкретной ошибки. Например, имя свойства в ошибке.
|
ExpressRouteProviderPort
Ресурс ExpressRouteProviderPort.
Имя |
Тип |
Описание |
etag
|
string
|
Уникальная строка, доступная только для чтения, которая изменяется при каждом обновлении ресурса.
|
id
|
string
|
Полный идентификатор ресурса.
|
location
|
string
|
Расположение ресурса.
|
name
|
string
|
Имя ресурса.
|
properties.overprovisionFactor
|
integer
|
Фактор избыточной подготовки для пары портов.
|
properties.peeringLocation
|
string
|
Расположение пиринга пары портов.
|
properties.portBandwidthInMbps
|
integer
|
Пропускная способность порта в Мбит/с
|
properties.portPairDescriptor
|
string
|
Имя пары портов.
|
properties.primaryAzurePort
|
string
|
Имя основного порта.
|
properties.remainingBandwidthInMbps
|
integer
|
Оставшаяся пропускная способность порта в Мбит/с
|
properties.secondaryAzurePort
|
string
|
Имя дополнительного порта.
|
properties.usedBandwidthInMbps
|
integer
|
Используемая пропускная способность порта в Мбит/с
|
tags
|
object
|
Теги ресурсов.
|
type
|
string
|
Тип ресурса. Например, Microsoft.Compute/virtualMachines или Microsoft.Storage/storageAccounts.
|