[Automation] Collect examples from azure-sdk-for-java#azure-resourcemanager_2.28.0

Co-authored-by: azure-sdk <azuresdk@microsoft.com>
This commit is contained in:
Azure-Fluent 2023-06-27 20:01:18 +08:00 коммит произвёл GitHub
Родитель 8cd5ae5aa1
Коммит d2535fa42e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3865 изменённых файлов: 13283 добавлений и 3426 удалений

Просмотреть файл

@ -0,0 +1,30 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.ApiPortalCustomDomainResourceInner;
import com.azure.resourcemanager.appplatform.models.ApiPortalCustomDomainProperties;
/** Samples for ApiPortalCustomDomains CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortalCustomDomains_CreateOrUpdate.json
*/
/**
* Sample code: ApiPortalCustomDomains_CreateOrUpdate.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalCustomDomainsCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortalCustomDomains()
.createOrUpdate(
"myResourceGroup",
"myservice",
"default",
"myDomainName",
new ApiPortalCustomDomainResourceInner()
.withProperties(new ApiPortalCustomDomainProperties().withThumbprint("*")),
Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for ApiPortalCustomDomains Delete. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortalCustomDomains_Delete.json
*/
/**
* Sample code: ApiPortalCustomDomains_Delete.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalCustomDomainsDelete(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortalCustomDomains()
.delete("myResourceGroup", "myservice", "default", "myDomainName", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for ApiPortalCustomDomains Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortalCustomDomains_Get.json
*/
/**
* Sample code: ApiPortalCustomDomains_Get.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalCustomDomainsGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortalCustomDomains()
.getWithResponse("myResourceGroup", "myservice", "default", "myDomainName", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for ApiPortalCustomDomains List. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortalCustomDomains_List.json
*/
/**
* Sample code: ApiPortalCustomDomains_List.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalCustomDomainsList(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortalCustomDomains()
.list("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,38 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.ApiPortalResourceInner;
import com.azure.resourcemanager.appplatform.models.ApiPortalProperties;
import com.azure.resourcemanager.appplatform.models.Sku;
import java.util.Arrays;
/** Samples for ApiPortals CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortals_CreateOrUpdate.json
*/
/**
* Sample code: ApiPortals_CreateOrUpdate.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalsCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortals()
.createOrUpdate(
"myResourceGroup",
"myservice",
"default",
new ApiPortalResourceInner()
.withProperties(
new ApiPortalProperties()
.withPublicProperty(true)
.withGatewayIds(
Arrays
.asList(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/gateways/default")))
.withSku(new Sku().withName("E0").withTier("Enterprise").withCapacity(2)),
Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for ApiPortals Delete. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortals_Delete.json
*/
/**
* Sample code: ApiPortals_Delete.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalsDelete(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortals()
.delete("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for ApiPortals Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortals_Get.json
*/
/**
* Sample code: ApiPortals_Get.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalsGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortals()
.getWithResponse("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for ApiPortals List. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortals_List.json
*/
/**
* Sample code: ApiPortals_List.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalsList(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortals()
.list("myResourceGroup", "myservice", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,27 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.models.CustomDomainValidatePayload;
/** Samples for ApiPortals ValidateDomain. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/ApiPortals_ValidateDomain.json
*/
/**
* Sample code: ApiPortals_ValidateDomain.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void apiPortalsValidateDomain(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApiPortals()
.validateDomainWithResponse(
"myResourceGroup",
"myservice",
"default",
new CustomDomainValidatePayload().withName("mydomain.io"),
Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,101 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.AppResourceInner;
import com.azure.resourcemanager.appplatform.models.AppResourceProperties;
import com.azure.resourcemanager.appplatform.models.AzureFileVolume;
import com.azure.resourcemanager.appplatform.models.CustomPersistentDiskResource;
import com.azure.resourcemanager.appplatform.models.LoadedCertificate;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityProperties;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityType;
import com.azure.resourcemanager.appplatform.models.PersistentDisk;
import com.azure.resourcemanager.appplatform.models.TemporaryDisk;
import com.azure.resourcemanager.appplatform.models.UserAssignedManagedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/** Samples for Apps CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_CreateOrUpdate.json
*/
/**
* Sample code: Apps_CreateOrUpdate.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.createOrUpdate(
"myResourceGroup",
"myservice",
"myapp",
new AppResourceInner()
.withProperties(
new AppResourceProperties()
.withPublicProperty(true)
.withAddonConfigs(
mapOf(
"ApplicationConfigurationService",
mapOf(
"resourceId",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs"),
"ServiceRegistry",
mapOf(
"resourceId",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry")))
.withHttpsOnly(false)
.withTemporaryDisk(new TemporaryDisk().withSizeInGB(2).withMountPath("/mytemporarydisk"))
.withPersistentDisk(new PersistentDisk().withSizeInGB(2).withMountPath("/mypersistentdisk"))
.withCustomPersistentDisks(
Arrays
.asList(
new CustomPersistentDiskResource()
.withCustomPersistentDiskProperties(
new AzureFileVolume()
.withMountPath("/mypath1/mypath2")
.withMountOptions(
Arrays
.asList(
"uid=0", "gid=0", "dir_mode=0777", "file_mode=0777"))
.withShareName("myFileShare"))
.withStorageId("myASCStorageID")))
.withEnableEndToEndTls(false)
.withLoadedCertificates(
Arrays
.asList(
new LoadedCertificate()
.withResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1")
.withLoadTrustStore(false),
new LoadedCertificate()
.withResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2")
.withLoadTrustStore(true))))
.withIdentity(
new ManagedIdentityProperties()
.withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(
mapOf(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
new UserAssignedManagedIdentity(),
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2",
new UserAssignedManagedIdentity())))
.withLocation("eastus"),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,103 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.AppResourceInner;
import com.azure.resourcemanager.appplatform.models.AppResourceProperties;
import com.azure.resourcemanager.appplatform.models.AppVNetAddons;
import com.azure.resourcemanager.appplatform.models.AzureFileVolume;
import com.azure.resourcemanager.appplatform.models.CustomPersistentDiskResource;
import com.azure.resourcemanager.appplatform.models.LoadedCertificate;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityProperties;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityType;
import com.azure.resourcemanager.appplatform.models.PersistentDisk;
import com.azure.resourcemanager.appplatform.models.TemporaryDisk;
import com.azure.resourcemanager.appplatform.models.UserAssignedManagedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/** Samples for Apps CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_CreateOrUpdate_VNetInjection.json
*/
/**
* Sample code: Apps_CreateOrUpdate_VNetInjection.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsCreateOrUpdateVNetInjection(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.createOrUpdate(
"myResourceGroup",
"myservice",
"myapp",
new AppResourceInner()
.withProperties(
new AppResourceProperties()
.withPublicProperty(true)
.withAddonConfigs(
mapOf(
"ApplicationConfigurationService",
mapOf(
"resourceId",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/configurationServices/myacs"),
"ServiceRegistry",
mapOf(
"resourceId",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/serviceRegistries/myServiceRegistry")))
.withHttpsOnly(false)
.withTemporaryDisk(new TemporaryDisk().withSizeInGB(2).withMountPath("/mytemporarydisk"))
.withPersistentDisk(new PersistentDisk().withSizeInGB(2).withMountPath("/mypersistentdisk"))
.withCustomPersistentDisks(
Arrays
.asList(
new CustomPersistentDiskResource()
.withCustomPersistentDiskProperties(
new AzureFileVolume()
.withMountPath("/mypath1/mypath2")
.withMountOptions(
Arrays
.asList(
"uid=0", "gid=0", "dir_mode=0777", "file_mode=0777"))
.withShareName("myFileShare"))
.withStorageId("myASCStorageID")))
.withEnableEndToEndTls(false)
.withLoadedCertificates(
Arrays
.asList(
new LoadedCertificate()
.withResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert1")
.withLoadTrustStore(false),
new LoadedCertificate()
.withResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/certificates/mycert2")
.withLoadTrustStore(true)))
.withVnetAddons(new AppVNetAddons().withPublicEndpoint(true)))
.withIdentity(
new ManagedIdentityProperties()
.withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(
mapOf(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
new UserAssignedManagedIdentity(),
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2",
new UserAssignedManagedIdentity())))
.withLocation("eastus"),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for Apps Delete. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_Delete.json
*/
/**
* Sample code: Apps_Delete.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsDelete(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.delete("myResourceGroup", "myservice", "myapp", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for Apps Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_Get.json
*/
/**
* Sample code: Apps_Get.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.getWithResponse("myResourceGroup", "myservice", "myapp", null, Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for Apps GetResourceUploadUrl. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_GetResourceUploadUrl.json
*/
/**
* Sample code: Apps_GetResourceUploadUrl.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsGetResourceUploadUrl(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.getResourceUploadUrlWithResponse("myResourceGroup", "myservice", "myapp", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for Apps Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_Get_VNetInjection.json
*/
/**
* Sample code: Apps_Get_VNetInjection.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsGetVNetInjection(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.getWithResponse("myResourceGroup", "myservice", "myapp", null, Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,16 @@
import com.azure.core.util.Context;
/** Samples for Apps List. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_List.json
*/
/**
* Sample code: Apps_List.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsList(com.azure.resourcemanager.AzureResourceManager azure) {
azure.springServices().manager().serviceClient().getApps().list("myResourceGroup", "myservice", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,16 @@
import com.azure.core.util.Context;
/** Samples for Apps List. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_List_VNetInjection.json
*/
/**
* Sample code: Apps_List_VNetInjection.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsListVNetInjection(com.azure.resourcemanager.AzureResourceManager azure) {
azure.springServices().manager().serviceClient().getApps().list("myResourceGroup", "myservice", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,28 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.models.ActiveDeploymentCollection;
import java.util.Arrays;
/** Samples for Apps SetActiveDeployments. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_SetActiveDeployments.json
*/
/**
* Sample code: Apps_SetActiveDeployments.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsSetActiveDeployments(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.setActiveDeployments(
"myResourceGroup",
"myservice",
"myapp",
new ActiveDeploymentCollection().withActiveDeploymentNames(Arrays.asList("default")),
Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,76 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.AppResourceInner;
import com.azure.resourcemanager.appplatform.models.AppResourceProperties;
import com.azure.resourcemanager.appplatform.models.AzureFileVolume;
import com.azure.resourcemanager.appplatform.models.CustomPersistentDiskResource;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityProperties;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityType;
import com.azure.resourcemanager.appplatform.models.PersistentDisk;
import com.azure.resourcemanager.appplatform.models.TemporaryDisk;
import com.azure.resourcemanager.appplatform.models.UserAssignedManagedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/** Samples for Apps Update. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_Update.json
*/
/**
* Sample code: Apps_Update.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.update(
"myResourceGroup",
"myservice",
"myapp",
new AppResourceInner()
.withProperties(
new AppResourceProperties()
.withPublicProperty(true)
.withHttpsOnly(false)
.withTemporaryDisk(new TemporaryDisk().withSizeInGB(2).withMountPath("/mytemporarydisk"))
.withPersistentDisk(new PersistentDisk().withSizeInGB(2).withMountPath("/mypersistentdisk"))
.withCustomPersistentDisks(
Arrays
.asList(
new CustomPersistentDiskResource()
.withCustomPersistentDiskProperties(
new AzureFileVolume()
.withMountPath("/mypath1/mypath2")
.withMountOptions(Arrays.asList())
.withShareName("myFileShare"))
.withStorageId("myASCStorageID")))
.withEnableEndToEndTls(false))
.withIdentity(
new ManagedIdentityProperties()
.withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(
mapOf(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
new UserAssignedManagedIdentity(),
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2",
new UserAssignedManagedIdentity())))
.withLocation("eastus"),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,78 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.AppResourceInner;
import com.azure.resourcemanager.appplatform.models.AppResourceProperties;
import com.azure.resourcemanager.appplatform.models.AppVNetAddons;
import com.azure.resourcemanager.appplatform.models.AzureFileVolume;
import com.azure.resourcemanager.appplatform.models.CustomPersistentDiskResource;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityProperties;
import com.azure.resourcemanager.appplatform.models.ManagedIdentityType;
import com.azure.resourcemanager.appplatform.models.PersistentDisk;
import com.azure.resourcemanager.appplatform.models.TemporaryDisk;
import com.azure.resourcemanager.appplatform.models.UserAssignedManagedIdentity;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/** Samples for Apps Update. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_Update_VNetInjection.json
*/
/**
* Sample code: Apps_Update_VNetInjection.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsUpdateVNetInjection(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.update(
"myResourceGroup",
"myservice",
"myapp",
new AppResourceInner()
.withProperties(
new AppResourceProperties()
.withPublicProperty(true)
.withHttpsOnly(false)
.withTemporaryDisk(new TemporaryDisk().withSizeInGB(2).withMountPath("/mytemporarydisk"))
.withPersistentDisk(new PersistentDisk().withSizeInGB(2).withMountPath("/mypersistentdisk"))
.withCustomPersistentDisks(
Arrays
.asList(
new CustomPersistentDiskResource()
.withCustomPersistentDiskProperties(
new AzureFileVolume()
.withMountPath("/mypath1/mypath2")
.withMountOptions(Arrays.asList())
.withShareName("myFileShare"))
.withStorageId("myASCStorageID")))
.withEnableEndToEndTls(false)
.withVnetAddons(new AppVNetAddons().withPublicEndpoint(true)))
.withIdentity(
new ManagedIdentityProperties()
.withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(
mapOf(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
new UserAssignedManagedIdentity(),
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2",
new UserAssignedManagedIdentity())))
.withLocation("eastus"),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,27 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.models.CustomDomainValidatePayload;
/** Samples for Apps ValidateDomain. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Apps_ValidateDomain.json
*/
/**
* Sample code: Apps_ValidateDomain.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void appsValidateDomain(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getApps()
.validateDomainWithResponse(
"myResourceGroup",
"myservice",
"myapp",
new CustomDomainValidatePayload().withName("mydomain.io"),
Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,48 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.BindingResourceInner;
import com.azure.resourcemanager.appplatform.models.BindingResourceProperties;
import java.util.HashMap;
import java.util.Map;
/** Samples for Bindings CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Bindings_CreateOrUpdate.json
*/
/**
* Sample code: Bindings_CreateOrUpdate.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void bindingsCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBindings()
.createOrUpdate(
"myResourceGroup",
"myservice",
"myapp",
"mybinding",
new BindingResourceInner()
.withProperties(
new BindingResourceProperties()
.withResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/my-cosmosdb-1")
.withKey("xxxx")
.withBindingParameters(mapOf("apiType", "SQL", "databaseName", "db1"))),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for Bindings Delete. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Bindings_Delete.json
*/
/**
* Sample code: Bindings_Delete.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void bindingsDelete(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBindings()
.delete("myResourceGroup", "myservice", "myapp", "mybinding", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for Bindings Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Bindings_Get.json
*/
/**
* Sample code: Bindings_Get.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void bindingsGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBindings()
.getWithResponse("myResourceGroup", "myservice", "myapp", "mybinding", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for Bindings List. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Bindings_List.json
*/
/**
* Sample code: Bindings_List.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void bindingsList(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBindings()
.list("myResourceGroup", "myservice", "myapp", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,46 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.BindingResourceInner;
import com.azure.resourcemanager.appplatform.models.BindingResourceProperties;
import java.util.HashMap;
import java.util.Map;
/** Samples for Bindings Update. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/Bindings_Update.json
*/
/**
* Sample code: Bindings_Update.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void bindingsUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBindings()
.update(
"myResourceGroup",
"myservice",
"myapp",
"mybinding",
new BindingResourceInner()
.withProperties(
new BindingResourceProperties()
.withKey("xxxx")
.withBindingParameters(mapOf("apiType", "SQL", "databaseName", "db1"))),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildServiceAgentPool Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceAgentPool_Get.json
*/
/**
* Sample code: BuildServiceAgentPool_Get.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceAgentPoolGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceAgentPools()
.getWithResponse("myResourceGroup", "myservice", "default", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildServiceAgentPool List. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceAgentPool_List.json
*/
/**
* Sample code: BuildServiceAgentPool_List.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceAgentPoolList(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceAgentPools()
.list("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,33 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.BuildServiceAgentPoolResourceInner;
import com.azure.resourcemanager.appplatform.models.BuildServiceAgentPoolProperties;
import com.azure.resourcemanager.appplatform.models.BuildServiceAgentPoolSizeProperties;
/** Samples for BuildServiceAgentPool UpdatePut. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceAgentPool_UpdatePut.json
*/
/**
* Sample code: BuildServiceAgentPool_UpdatePut.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceAgentPoolUpdatePut(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceAgentPools()
.updatePut(
"myResourceGroup",
"myservice",
"default",
"default",
new BuildServiceAgentPoolResourceInner()
.withProperties(
new BuildServiceAgentPoolProperties()
.withPoolSize(new BuildServiceAgentPoolSizeProperties().withName("S3"))),
Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,46 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.BuilderResourceInner;
import com.azure.resourcemanager.appplatform.models.BuilderProperties;
import com.azure.resourcemanager.appplatform.models.BuildpackProperties;
import com.azure.resourcemanager.appplatform.models.BuildpacksGroupProperties;
import com.azure.resourcemanager.appplatform.models.StackProperties;
import java.util.Arrays;
/** Samples for BuildServiceBuilder CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceBuilder_CreateOrUpdate.json
*/
/**
* Sample code: BuildServiceBuilder_CreateOrUpdate.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceBuilderCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceBuilders()
.createOrUpdate(
"myResourceGroup",
"myservice",
"default",
"mybuilder",
new BuilderResourceInner()
.withProperties(
new BuilderProperties()
.withStack(new StackProperties().withId("io.buildpacks.stacks.bionic").withVersion("base"))
.withBuildpackGroups(
Arrays
.asList(
new BuildpacksGroupProperties()
.withName("mix")
.withBuildpacks(
Arrays
.asList(
new BuildpackProperties()
.withId("tanzu-buildpacks/java-azure")))))),
Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildServiceBuilder Delete. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceBuilder_Delete.json
*/
/**
* Sample code: BuildServiceBuilder_Delete.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceBuilderDelete(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceBuilders()
.delete("myResourceGroup", "myservice", "default", "mybuilder", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildServiceBuilder Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceBuilder_Get.json
*/
/**
* Sample code: BuildServiceBuilder_Get.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceBuilderGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceBuilders()
.getWithResponse("myResourceGroup", "myservice", "default", "mybuilder", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildServiceBuilder List. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceBuilder_List.json
*/
/**
* Sample code: BuildServiceBuilder_List.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceBuilderList(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceBuilders()
.list("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildServiceBuilder ListDeployments. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildServiceBuilder_ListDeployments.json
*/
/**
* Sample code: BuildServiceBuilder_ListDeployments.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceBuilderListDeployments(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServiceBuilders()
.listDeploymentsWithResponse("myResourceGroup", "myservice", "default", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,53 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.BuildInner;
import com.azure.resourcemanager.appplatform.models.BuildProperties;
import com.azure.resourcemanager.appplatform.models.BuildResourceRequests;
import java.util.HashMap;
import java.util.Map;
/** Samples for BuildService CreateOrUpdateBuild. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_CreateOrUpdateBuild.json
*/
/**
* Sample code: BuildService_CreateOrUpdateBuild.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceCreateOrUpdateBuild(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.createOrUpdateBuildWithResponse(
"myResourceGroup",
"myservice",
"default",
"mybuild",
new BuildInner()
.withProperties(
new BuildProperties()
.withRelativePath(
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855-20210601-3ed9f4a2-986b-4bbd-b833-a42dccb2f777")
.withBuilder(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/builders/default")
.withAgentPool(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.AppPlatform/Spring/myservice/buildServices/default/agentPools/default")
.withEnv(mapOf("environmentVariable", "test"))
.withResourceRequests(new BuildResourceRequests().withCpu("1").withMemory("2Gi"))),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService GetBuild. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_GetBuild.json
*/
/**
* Sample code: BuildService_GetBuild.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceGetBuild(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.getBuildWithResponse("myResourceGroup", "myservice", "default", "mybuild", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService GetBuildResult. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_GetBuildResult.json
*/
/**
* Sample code: BuildService_GetBuildResult.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceGetBuildResult(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.getBuildResultWithResponse("myResourceGroup", "myservice", "default", "mybuild", "123", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService GetBuildResultLog. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_GetBuildResultLog.json
*/
/**
* Sample code: BuildService_GetBuildResultLog.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceGetBuildResultLog(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.getBuildResultLogWithResponse("myResourceGroup", "myservice", "default", "mybuild", "123", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService GetBuildService. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_GetBuildService.json
*/
/**
* Sample code: BuildService_GetBuildService.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceGetBuildService(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.getBuildServiceWithResponse("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService GetResourceUploadUrl. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_GetResourceUploadUrl.json
*/
/**
* Sample code: BuildService_GetResourceUploadUrl.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceGetResourceUploadUrl(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.getResourceUploadUrlWithResponse("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,22 @@
import com.azure.core.util.Context;
/** Samples for BuildService GetSupportedBuildpack. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_GetSupportedBuildpack.json
*/
/**
* Sample code: BuildService_GetSupportedBuildpack.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceGetSupportedBuildpack(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.getSupportedBuildpackWithResponse(
"myResourceGroup", "myservice", "default", "tanzu-buildpacks-java-azure", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,22 @@
import com.azure.core.util.Context;
/** Samples for BuildService GetSupportedStack. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_GetSupportedStack.json
*/
/**
* Sample code: BuildService_GetSupportedStack.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceGetSupportedStack(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.getSupportedStackWithResponse(
"myResourceGroup", "myservice", "default", "io.buildpacks.stacks.bionic-base", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService ListBuildResults. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_ListBuildResults.json
*/
/**
* Sample code: BuildService_ListBuildResults.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceListBuildResults(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.listBuildResults("myResourceGroup", "myservice", "default", "mybuild", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService ListBuildServices. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_ListBuildServices.json
*/
/**
* Sample code: BuildService_ListBuildServices.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceListBuildServices(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.listBuildServices("myResourceGroup", "myservice", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService ListBuilds. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_ListBuilds.json
*/
/**
* Sample code: BuildService_ListBuilds.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceListBuilds(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.listBuilds("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService ListSupportedBuildpacks. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_ListSupportedBuildpacks.json
*/
/**
* Sample code: BuildService_ListSupportedBuildpacks.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceListSupportedBuildpacks(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.listSupportedBuildpacksWithResponse("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildService ListSupportedStacks. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildService_ListSupportedStacks.json
*/
/**
* Sample code: BuildService_ListSupportedStacks.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildServiceListSupportedStacks(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildServices()
.listSupportedStacksWithResponse("myResourceGroup", "myservice", "default", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,56 @@
import com.azure.core.util.Context;
import com.azure.resourcemanager.appplatform.fluent.models.BuildpackBindingResourceInner;
import com.azure.resourcemanager.appplatform.models.BindingType;
import com.azure.resourcemanager.appplatform.models.BuildpackBindingLaunchProperties;
import com.azure.resourcemanager.appplatform.models.BuildpackBindingProperties;
import java.util.HashMap;
import java.util.Map;
/** Samples for BuildpackBinding CreateOrUpdate. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildpackBinding_CreateOrUpdate.json
*/
/**
* Sample code: BuildpackBinding_CreateOrUpdate.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildpackBindingCreateOrUpdate(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildpackBindings()
.createOrUpdate(
"myResourceGroup",
"myservice",
"default",
"default",
"myBuildpackBinding",
new BuildpackBindingResourceInner()
.withProperties(
new BuildpackBindingProperties()
.withBindingType(BindingType.APPLICATION_INSIGHTS)
.withLaunchProperties(
new BuildpackBindingLaunchProperties()
.withProperties(
mapOf("abc", "def", "any-string", "any-string", "sampling-rate", "12.0"))
.withSecrets(
mapOf(
"connection-string",
"XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXX;XXXXXXXXXXXXXXXXX=XXXXXXXXXXXXXXXXXXX")))),
Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildpackBinding Delete. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildpackBinding_Delete.json
*/
/**
* Sample code: BuildpackBinding_Delete.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildpackBindingDelete(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildpackBindings()
.delete("myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Просмотреть файл

@ -0,0 +1,21 @@
import com.azure.core.util.Context;
/** Samples for BuildpackBinding Get. */
public final class Main {
/*
* x-ms-original-file: specification/appplatform/resource-manager/Microsoft.AppPlatform/stable/2022-12-01/examples/BuildpackBinding_Get.json
*/
/**
* Sample code: BuildpackBinding_Get.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void buildpackBindingGet(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.springServices()
.manager()
.serviceClient()
.getBuildpackBindings()
.getWithResponse("myResourceGroup", "myservice", "default", "default", "myBuildpackBinding", Context.NONE);
}
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager_2.28.0/sdk/resourcemanager/azure-resourcemanager/README.md"}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше