Obter um Suplemento
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/addons/{addonName}?api-version=2023-09-01
Parâmetros do URI
Name |
Em |
Necessário |
Tipo |
Description |
addonName
|
path |
True
|
string
|
Nome do suplemento.
Padrão Regex: ^[-\w\._]+$
|
privateCloudName
|
path |
True
|
string
|
Nome da nuvem privada
Padrão Regex: ^[-\w\._]+$
|
resourceGroupName
|
path |
True
|
string
|
O nome do grupo de recursos. O nome não é sensível a maiúsculas e minúsculas.
|
subscriptionId
|
path |
True
|
string
uuid
|
O ID da subscrição de destino. O valor tem de ser um UUID.
|
api-version
|
query |
True
|
string
|
A versão da API a utilizar para esta operação.
|
Respostas
Name |
Tipo |
Description |
200 OK
|
Addon
|
A operação do Azure foi concluída com êxito.
|
Other Status Codes
|
ErrorResponse
|
Uma resposta de erro inesperada.
|
Segurança
azure_auth
Fluxo OAuth2 do Azure Active Directory.
Tipo:
oauth2
Fluxo:
implicit
URL de Autorização:
https://login.microsoftonline.com/common/oauth2/authorize
Âmbitos
Name |
Description |
user_impersonation
|
representar a sua conta de utilizador
|
Exemplos
Addons_Get_ArcReg
Pedido de amostra
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/arc?api-version=2023-09-01
/**
* Samples for Addons Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json
*/
/**
* Sample code: Addons_Get_ArcReg.
*
* @param manager Entry point to AvsManager.
*/
public static void addonsGetArcReg(com.azure.resourcemanager.avs.AvsManager manager) {
manager.addons().getWithResponse("group1", "cloud1", "arc", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.avs import AVSClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-avs
# USAGE
python addons_get_arc_reg.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 = AVSClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.addons.get(
resource_group_name="group1",
private_cloud_name="cloud1",
addon_name="arc",
)
print(response)
# x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.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 armavs_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7678455846b1000fd31db27596e4ca3d299a872/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json
func ExampleAddonsClient_Get_addonsGetArcReg() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "arc", 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.Addon = armavs.Addon{
// Name: to.Ptr("arc"),
// Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/arc"),
// Properties: &armavs.AddonArcProperties{
// AddonType: to.Ptr(armavs.AddonTypeArc),
// ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
// VCenter: to.Ptr("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureVMwareSolutionAPI } = require("@azure/arm-avs");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a Addon
*
* @summary Get a Addon
* x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json
*/
async function addonsGetArcReg() {
const subscriptionId =
process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1";
const privateCloudName = "cloud1";
const addonName = "arc";
const credential = new DefaultAzureCredential();
const client = new AzureVMwareSolutionAPI(credential, subscriptionId);
const result = await client.addons.get(resourceGroupName, privateCloudName, addonName);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Avs.Models;
using Azure.ResourceManager.Avs;
// Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_ArcReg.json
// this example is just showing the usage of "Addons_Get" 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 AvsPrivateCloudResource created on azure
// for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
// get the collection of this AvsPrivateCloudAddonResource
AvsPrivateCloudAddonCollection collection = avsPrivateCloud.GetAvsPrivateCloudAddons();
// invoke the operation
string addonName = "arc";
NullableResponse<AvsPrivateCloudAddonResource> response = await collection.GetIfExistsAsync(addonName);
AvsPrivateCloudAddonResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
AvsPrivateCloudAddonData 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
Resposta da amostra
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/arc",
"name": "arc",
"properties": {
"addonType": "Arc",
"vCenter": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg_test/providers/Microsoft.ConnectedVMwarevSphere/VCenters/test-vcenter",
"provisioningState": "Succeeded"
},
"type": "Microsoft.AVS/privateClouds/addons"
}
Addons_Get_HCX
Pedido de amostra
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx?api-version=2023-09-01
/**
* Samples for Addons Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json
*/
/**
* Sample code: Addons_Get_HCX.
*
* @param manager Entry point to AvsManager.
*/
public static void addonsGetHCX(com.azure.resourcemanager.avs.AvsManager manager) {
manager.addons().getWithResponse("group1", "cloud1", "hcx", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.avs import AVSClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-avs
# USAGE
python addons_get_hcx.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 = AVSClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.addons.get(
resource_group_name="group1",
private_cloud_name="cloud1",
addon_name="hcx",
)
print(response)
# x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.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 armavs_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7678455846b1000fd31db27596e4ca3d299a872/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json
func ExampleAddonsClient_Get_addonsGetHcx() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "hcx", 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.Addon = armavs.Addon{
// Name: to.Ptr("hcx"),
// Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx"),
// Properties: &armavs.AddonHcxProperties{
// AddonType: to.Ptr(armavs.AddonTypeHCX),
// ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
// Offer: to.Ptr("VMware MaaS Cloud Provider (Enterprise)"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureVMwareSolutionAPI } = require("@azure/arm-avs");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a Addon
*
* @summary Get a Addon
* x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json
*/
async function addonsGetHcx() {
const subscriptionId =
process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1";
const privateCloudName = "cloud1";
const addonName = "hcx";
const credential = new DefaultAzureCredential();
const client = new AzureVMwareSolutionAPI(credential, subscriptionId);
const result = await client.addons.get(resourceGroupName, privateCloudName, addonName);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Avs.Models;
using Azure.ResourceManager.Avs;
// Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_HCX.json
// this example is just showing the usage of "Addons_Get" 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 AvsPrivateCloudResource created on azure
// for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
// get the collection of this AvsPrivateCloudAddonResource
AvsPrivateCloudAddonCollection collection = avsPrivateCloud.GetAvsPrivateCloudAddons();
// invoke the operation
string addonName = "hcx";
NullableResponse<AvsPrivateCloudAddonResource> response = await collection.GetIfExistsAsync(addonName);
AvsPrivateCloudAddonResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
AvsPrivateCloudAddonData 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
Resposta da amostra
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/hcx",
"name": "hcx",
"properties": {
"addonType": "HCX",
"offer": "VMware MaaS Cloud Provider (Enterprise)",
"provisioningState": "Succeeded"
},
"type": "Microsoft.AVS/privateClouds/addons"
}
Addons_Get_SRM
Pedido de amostra
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/srm?api-version=2023-09-01
/**
* Samples for Addons Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json
*/
/**
* Sample code: Addons_Get_SRM.
*
* @param manager Entry point to AvsManager.
*/
public static void addonsGetSRM(com.azure.resourcemanager.avs.AvsManager manager) {
manager.addons().getWithResponse("group1", "cloud1", "srm", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.avs import AVSClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-avs
# USAGE
python addons_get_srm.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 = AVSClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.addons.get(
resource_group_name="group1",
private_cloud_name="cloud1",
addon_name="srm",
)
print(response)
# x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.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 armavs_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7678455846b1000fd31db27596e4ca3d299a872/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json
func ExampleAddonsClient_Get_addonsGetSrm() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "srm", 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.Addon = armavs.Addon{
// Name: to.Ptr("srm"),
// Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/srm"),
// Properties: &armavs.AddonSrmProperties{
// AddonType: to.Ptr(armavs.AddonTypeSRM),
// ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
// LicenseKey: to.Ptr("41915178-A8FF-4A4D-B683-6D735AF5E3F5"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureVMwareSolutionAPI } = require("@azure/arm-avs");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a Addon
*
* @summary Get a Addon
* x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json
*/
async function addonsGetSrm() {
const subscriptionId =
process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1";
const privateCloudName = "cloud1";
const addonName = "srm";
const credential = new DefaultAzureCredential();
const client = new AzureVMwareSolutionAPI(credential, subscriptionId);
const result = await client.addons.get(resourceGroupName, privateCloudName, addonName);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Avs.Models;
using Azure.ResourceManager.Avs;
// Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_SRM.json
// this example is just showing the usage of "Addons_Get" 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 AvsPrivateCloudResource created on azure
// for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
// get the collection of this AvsPrivateCloudAddonResource
AvsPrivateCloudAddonCollection collection = avsPrivateCloud.GetAvsPrivateCloudAddons();
// invoke the operation
string addonName = "srm";
NullableResponse<AvsPrivateCloudAddonResource> response = await collection.GetIfExistsAsync(addonName);
AvsPrivateCloudAddonResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
AvsPrivateCloudAddonData 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
Resposta da amostra
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/srm",
"name": "srm",
"properties": {
"addonType": "SRM",
"licenseKey": "41915178-A8FF-4A4D-B683-6D735AF5E3F5",
"provisioningState": "Succeeded"
},
"type": "Microsoft.AVS/privateClouds/addons"
}
Addons_Get_VR
Pedido de amostra
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr?api-version=2023-09-01
/**
* Samples for Addons Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json
*/
/**
* Sample code: Addons_Get_VR.
*
* @param manager Entry point to AvsManager.
*/
public static void addonsGetVR(com.azure.resourcemanager.avs.AvsManager manager) {
manager.addons().getWithResponse("group1", "cloud1", "vr", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.avs import AVSClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-avs
# USAGE
python addons_get_vr.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 = AVSClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.addons.get(
resource_group_name="group1",
private_cloud_name="cloud1",
addon_name="vr",
)
print(response)
# x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.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 armavs_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/avs/armavs/v2"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e7678455846b1000fd31db27596e4ca3d299a872/specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json
func ExampleAddonsClient_Get_addonsGetVr() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armavs.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewAddonsClient().Get(ctx, "group1", "cloud1", "vr", 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.Addon = armavs.Addon{
// Name: to.Ptr("vr"),
// Type: to.Ptr("Microsoft.AVS/privateClouds/addons"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr"),
// Properties: &armavs.AddonVrProperties{
// AddonType: to.Ptr(armavs.AddonTypeVR),
// ProvisioningState: to.Ptr(armavs.AddonProvisioningStateSucceeded),
// VrsCount: to.Ptr[int32](1),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { AzureVMwareSolutionAPI } = require("@azure/arm-avs");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Get a Addon
*
* @summary Get a Addon
* x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json
*/
async function addonsGetVr() {
const subscriptionId =
process.env["AVS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["AVS_RESOURCE_GROUP"] || "group1";
const privateCloudName = "cloud1";
const addonName = "vr";
const credential = new DefaultAzureCredential();
const client = new AzureVMwareSolutionAPI(credential, subscriptionId);
const result = await client.addons.get(resourceGroupName, privateCloudName, addonName);
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 Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Avs.Models;
using Azure.ResourceManager.Avs;
// Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Addons_Get_VR.json
// this example is just showing the usage of "Addons_Get" 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 AvsPrivateCloudResource created on azure
// for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
// get the collection of this AvsPrivateCloudAddonResource
AvsPrivateCloudAddonCollection collection = avsPrivateCloud.GetAvsPrivateCloudAddons();
// invoke the operation
string addonName = "vr";
NullableResponse<AvsPrivateCloudAddonResource> response = await collection.GetIfExistsAsync(addonName);
AvsPrivateCloudAddonResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
AvsPrivateCloudAddonData 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
Resposta da amostra
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/addons/vr",
"name": "vr",
"properties": {
"addonType": "VR",
"vrsCount": 1,
"provisioningState": "Succeeded"
},
"type": "Microsoft.AVS/privateClouds/addons"
}
Definições
Addon
Um recurso de suplemento
Name |
Tipo |
Description |
id
|
string
|
ID de recurso completamente qualificado para o recurso. Por exemplo, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
name
|
string
|
O nome do recurso
|
properties.addonType
|
AddonType
|
Tipo de suplemento
|
properties.provisioningState
|
AddonProvisioningState
|
O estado do aprovisionamento do suplemento
|
systemData
|
systemData
|
O Azure Resource Manager metadados que contêm createdBy e modifiedBy information.
|
type
|
string
|
O tipo do recurso. Por exemplo, "Microsoft.Compute/virtualMachines" ou "Microsoft.Storage/storageAccounts"
|
AddonProvisioningState
Estado de aprovisionamento do suplemento
Name |
Tipo |
Description |
Building
|
string
|
está a construir
|
Canceled
|
string
|
A criação de recursos foi cancelada.
|
Cancelled
|
string
|
foi cancelado
|
Deleting
|
string
|
está a eliminar
|
Failed
|
string
|
Falha na criação de recursos.
|
Succeeded
|
string
|
O recurso foi criado.
|
Updating
|
string
|
está a atualizar
|
AddonType
Tipo de suplemento
Name |
Tipo |
Description |
Arc
|
string
|
|
HCX
|
string
|
|
SRM
|
string
|
|
VR
|
string
|
|
createdByType
O tipo de identidade que criou o recurso.
Name |
Tipo |
Description |
Application
|
string
|
|
Key
|
string
|
|
ManagedIdentity
|
string
|
|
User
|
string
|
|
ErrorAdditionalInfo
Informações adicionais sobre o erro de gestão de recursos.
Name |
Tipo |
Description |
info
|
object
|
As informações adicionais.
|
type
|
string
|
O tipo de informações adicionais.
|
ErrorDetail
O detalhe do erro.
Name |
Tipo |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
As informações adicionais do erro.
|
code
|
string
|
O código de erro.
|
details
|
ErrorDetail[]
|
Os detalhes do erro.
|
message
|
string
|
A mensagem de erro.
|
target
|
string
|
O destino do erro.
|
ErrorResponse
Resposta a erros
Name |
Tipo |
Description |
error
|
ErrorDetail
|
O objeto de erro.
|
systemData
Metadados relativos à criação e última modificação do recurso.
Name |
Tipo |
Description |
createdAt
|
string
|
O carimbo de data/hora da criação de recursos (UTC).
|
createdBy
|
string
|
A identidade que criou o recurso.
|
createdByType
|
createdByType
|
O tipo de identidade que criou o recurso.
|
lastModifiedAt
|
string
|
O carimbo de data/hora da última modificação do recurso (UTC)
|
lastModifiedBy
|
string
|
A identidade que modificou o recurso pela última vez.
|
lastModifiedByType
|
createdByType
|
O tipo de identidade que modificou o recurso pela última vez.
|