[Automation] Collect examples from azure-sdk-for-java#azure-resourcemanager-managedapplications_1.0.0-beta.4

This commit is contained in:
Azure SDK Bot 2024-11-02 04:03:02 -07:00 коммит произвёл GitHub
Родитель 12330ee622
Коммит 35f33ae561
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
50 изменённых файлов: 306 добавлений и 264 удалений

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

@ -1,22 +1,22 @@
/** Samples for Applications CreateOrUpdate. */
/**
* Samples for Applications CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/createOrUpdateApplication.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/createOrUpdateApplication
* .json
*/
/**
* Sample code: Create or update managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void createOrUpdateManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.define("myManagedApplication")
.withRegion((String) null)
.withExistingResourceGroup("rg")
.withKind("ServiceCatalog")
.withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
public static void
createOrUpdateManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().define("myManagedApplication").withRegion((String) null).withExistingResourceGroup("rg")
.withKind("ServiceCatalog").withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
.withApplicationDefinitionId(
"/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef")
.create();

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,26 +1,27 @@
import com.azure.resourcemanager.managedapplications.fluent.models.ApplicationInner;
/** Samples for Applications CreateOrUpdateById. */
/**
* Samples for Applications CreateOrUpdateById.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/createOrUpdateApplicationById.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* createOrUpdateApplicationById.json
*/
/**
* Sample code: Creates or updates a managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void createsOrUpdatesAManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.createOrUpdateById(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
new ApplicationInner()
.withKind("ServiceCatalog")
.withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
.withApplicationDefinitionId(
"/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"),
com.azure.core.util.Context.NONE);
public static void
createsOrUpdatesAManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().createOrUpdateById(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
new ApplicationInner().withKind("ServiceCatalog")
.withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
.withApplicationDefinitionId(
"/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"),
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,36 +1,31 @@
import com.azure.resourcemanager.managedapplications.fluent.models.ApplicationDefinitionInner;
import com.azure.resourcemanager.managedapplications.models.ApplicationAuthorization;
import com.azure.resourcemanager.managedapplications.models.ApplicationLockLevel;
import java.util.Arrays;
/** Samples for ApplicationDefinitions CreateOrUpdateById. */
/**
* Samples for ApplicationDefinitions CreateOrUpdateById.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/createOrUpdateApplicationDefinition.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* createOrUpdateApplicationDefinition.json
*/
/**
* Sample code: Create or update managed application definition.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void createOrUpdateManagedApplicationDefinition(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applicationDefinitions()
.createOrUpdateByIdWithResponse(
"rg",
"myManagedApplicationDef",
new ApplicationDefinitionInner()
.withLockLevel(ApplicationLockLevel.NONE)
.withDisplayName("myManagedApplicationDef")
.withAuthorizations(
Arrays
.asList(
new ApplicationAuthorization()
.withPrincipalId("validprincipalguid")
.withRoleDefinitionId("validroleguid")))
.withDescription("myManagedApplicationDef description")
.withPackageFileUri("https://path/to/packagezipfile"),
com.azure.core.util.Context.NONE);
manager.applicationDefinitions().createOrUpdateByIdWithResponse("rg", "myManagedApplicationDef",
new ApplicationDefinitionInner().withLockLevel(ApplicationLockLevel.NONE)
.withDisplayName("myManagedApplicationDef")
.withAuthorizations(Arrays.asList(new ApplicationAuthorization().withPrincipalId("validprincipalguid")
.withRoleDefinitionId("validroleguid")))
.withDescription("myManagedApplicationDef description")
.withPackageFileUri("https://path/to/packagezipfile"),
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,3 +1,4 @@
import com.azure.resourcemanager.managedapplications.models.JitAuthorizationPolicies;
import com.azure.resourcemanager.managedapplications.models.JitSchedulingPolicy;
import com.azure.resourcemanager.managedapplications.models.JitSchedulingType;
@ -5,35 +6,30 @@ import java.time.Duration;
import java.time.OffsetDateTime;
import java.util.Arrays;
/** Samples for JitRequests CreateOrUpdate. */
/**
* Samples for JitRequests CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/createOrUpdateJitRequest.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/createOrUpdateJitRequest.
* json
*/
/**
* Sample code: Create or update jit request.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void createOrUpdateJitRequest(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.jitRequests()
.define("myJitRequest")
.withRegion((String) null)
.withExistingResourceGroup("rg")
public static void
createOrUpdateJitRequest(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.jitRequests().define("myJitRequest").withRegion((String) null).withExistingResourceGroup("rg")
.withApplicationResourceId(
"/subscriptions/00c76877-e316-48a7-af60-4a09fec9d43f/resourceGroups/52F30DB2/providers/Microsoft.Solutions/applications/7E193158")
.withJitAuthorizationPolicies(
Arrays
.asList(
new JitAuthorizationPolicies()
.withPrincipalId("1db8e132e2934dbcb8e1178a61319491")
.withRoleDefinitionId("ecd05a23-931a-4c38-a52b-ac7c4c583334")))
Arrays.asList(new JitAuthorizationPolicies().withPrincipalId("1db8e132e2934dbcb8e1178a61319491")
.withRoleDefinitionId("ecd05a23-931a-4c38-a52b-ac7c4c583334")))
.withJitSchedulingPolicy(
new JitSchedulingPolicy()
.withType(JitSchedulingType.ONCE)
.withDuration(Duration.parse("PT8H"))
new JitSchedulingPolicy().withType(JitSchedulingType.ONCE).withDuration(Duration.parse("PT8H"))
.withStartTime(OffsetDateTime.parse("2021-04-22T05:48:30.6661804Z")))
.create();
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,15 +1,19 @@
/** Samples for Applications Delete. */
/**
* Samples for Applications Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/deleteApplication.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/deleteApplication.json
*/
/**
* Sample code: Delete managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void deleteManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
public static void
deleteManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().delete("rg", "myManagedApplication", com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,19 +1,22 @@
/** Samples for Applications DeleteById. */
/**
* Samples for Applications DeleteById.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/deleteApplicationById.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/deleteApplicationById.
* json
*/
/**
* Sample code: Deletes the managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void deletesTheManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.deleteById(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
com.azure.core.util.Context.NONE);
public static void
deletesTheManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().deleteById(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,17 +1,20 @@
/** Samples for ApplicationDefinitions Delete. */
/**
* Samples for ApplicationDefinitions DeleteById.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/deleteApplicationDefinition.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* deleteApplicationDefinition.json
*/
/**
* Sample code: delete managed application definition.
*
* Sample code: Deletes managed application definition.
*
* @param manager Entry point to ApplicationManager.
*/
public static void deleteManagedApplicationDefinition(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applicationDefinitions()
.deleteByResourceGroupWithResponse("rg", "myManagedApplicationDef", com.azure.core.util.Context.NONE);
public static void
deletesManagedApplicationDefinition(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applicationDefinitions().deleteByIdWithResponse("rg", "myManagedApplicationDef",
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,11 +1,15 @@
/** Samples for JitRequests Delete. */
/**
* Samples for JitRequests Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/deleteJitRequest.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/deleteJitRequest.json
*/
/**
* Sample code: Delete jit request.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void deleteJitRequest(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,17 +1,20 @@
/** Samples for Applications GetByResourceGroup. */
/**
* Samples for Applications GetByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getApplication.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getApplication.json
*/
/**
* Sample code: Get a managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void getAManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.getByResourceGroupWithResponse("rg", "myManagedApplication", com.azure.core.util.Context.NONE);
public static void
getAManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().getByResourceGroupWithResponse("rg", "myManagedApplication",
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,19 +1,21 @@
/** Samples for Applications GetById. */
/**
* Samples for Applications GetById.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getApplicationById.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getApplicationById.json
*/
/**
* Sample code: Gets the managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void getsTheManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.getByIdWithResponse(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
com.azure.core.util.Context.NONE);
public static void
getsTheManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().getByIdWithResponse(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,17 +1,21 @@
/** Samples for ApplicationDefinitions GetById. */
/**
* Samples for ApplicationDefinitions GetById.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getApplicationDefinition.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getApplicationDefinition.
* json
*/
/**
* Sample code: Get managed application definition.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void getManagedApplicationDefinition(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applicationDefinitions()
.getByIdWithResponse("rg", "myManagedApplicationDef", com.azure.core.util.Context.NONE);
public static void
getManagedApplicationDefinition(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applicationDefinitions().getByIdWithResponse("rg", "myManagedApplicationDef",
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,11 +1,15 @@
/** Samples for JitRequests GetByResourceGroup. */
/**
* Samples for JitRequests GetByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getJitRequest.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/getJitRequest.json
*/
/**
* Sample code: Gets the jit request.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void getsTheJitRequest(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,17 +1,21 @@
/** Samples for Applications ListAllowedUpgradePlans. */
/**
* Samples for Applications ListAllowedUpgradePlans.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listAllowedUpgradePlans.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listAllowedUpgradePlans.
* json
*/
/**
* Sample code: List allowed upgrade plans for application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void listAllowedUpgradePlansForApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.listAllowedUpgradePlansWithResponse("rg", "myManagedApplication", com.azure.core.util.Context.NONE);
manager.applications().listAllowedUpgradePlansWithResponse("rg", "myManagedApplication",
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,11 +1,15 @@
/** Samples for ApplicationDefinitions ListByResourceGroup. */
/**
* Samples for ApplicationDefinitions ListByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listApplicationDefinitionsByResourceGroup.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* listApplicationDefinitionsByResourceGroup.json
*/
/**
* Sample code: Lists the managed application definitions in a resource group.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void listsTheManagedApplicationDefinitionsInAResourceGroup(

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,11 +1,15 @@
/** Samples for ApplicationDefinitions List. */
/**
* Samples for ApplicationDefinitions List.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listApplicationDefinitionsBySubscription.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* listApplicationDefinitionsBySubscription.json
*/
/**
* Sample code: Lists all the application definitions within a subscription.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void listsAllTheApplicationDefinitionsWithinASubscription(

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,15 +1,19 @@
/** Samples for Applications List. */
/**
* Samples for Applications ListByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listApplicationsByResourceGroup.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* listApplicationsByResourceGroup.json
*/
/**
* Sample code: Lists all the applications within a subscription.
*
* Sample code: Lists all the applications within a resource group.
*
* @param manager Entry point to ApplicationManager.
*/
public static void listsAllTheApplicationsWithinASubscription(
public static void listsAllTheApplicationsWithinAResourceGroup(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().list(com.azure.core.util.Context.NONE);
manager.applications().listByResourceGroup("rg", com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,11 +1,15 @@
/** Samples for JitRequests ListByResourceGroup. */
/**
* Samples for JitRequests ListByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listJitRequestsByResourceGroup.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* listJitRequestsByResourceGroup.json
*/
/**
* Sample code: Lists all JIT requests within the resource group.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void listsAllJITRequestsWithinTheResourceGroup(

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,15 +1,20 @@
/** Samples for ResourceProvider ListOperations. */
/**
* Samples for ResourceProvider ListOperations.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listSolutionsOperations.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listSolutionsOperations.
* json
*/
/**
* Sample code: List Solutions operations.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void listSolutionsOperations(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
public static void
listSolutionsOperations(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.resourceProviders().listOperations(com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,26 +1,25 @@
import com.azure.resourcemanager.managedapplications.models.ListTokenRequest;
import java.util.Arrays;
/** Samples for Applications ListTokens. */
/**
* Samples for Applications ListTokens.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listToken.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/listToken.json
*/
/**
* Sample code: List tokens for application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void listTokensForApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.listTokensWithResponse(
"rg",
"myManagedApplication",
new ListTokenRequest()
.withAuthorizationAudience("fakeTokenPlaceholder")
.withUserAssignedIdentities(Arrays.asList("IdentityOne", "IdentityTwo")),
com.azure.core.util.Context.NONE);
public static void
listTokensForApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().listTokensWithResponse(
"rg", "myManagedApplication", new ListTokenRequest().withAuthorizationAudience("fakeTokenPlaceholder")
.withUserAssignedIdentities(Arrays.asList("IdentityOne", "IdentityTwo")),
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,15 +1,19 @@
/** Samples for Applications RefreshPermissions. */
/**
* Samples for Applications RefreshPermissions.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/refreshApplicationPermissions.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* refreshApplicationPermissions.json
*/
/**
* Sample code: Refresh managed application permissions.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void refreshManagedApplicationPermissions(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
public static void
refreshManagedApplicationPermissions(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().refreshPermissions("rg", "myManagedApplication", com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,35 +1,28 @@
import com.azure.resourcemanager.managedapplications.fluent.models.UpdateAccessDefinitionInner;
import com.azure.resourcemanager.managedapplications.models.JitRequestMetadata;
import com.azure.resourcemanager.managedapplications.models.Status;
import com.azure.resourcemanager.managedapplications.models.Substatus;
/** Samples for Applications UpdateAccess. */
/**
* Samples for Applications UpdateAccess.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateAccess.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateAccess.json
*/
/**
* Sample code: Update access for application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void updateAccessForApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.updateAccess(
"rg",
"myManagedApplication",
new UpdateAccessDefinitionInner()
.withApprover("amauser")
.withMetadata(
new JitRequestMetadata()
.withOriginRequestId("originRequestId")
.withRequestorId("RequestorId")
.withTenantDisplayName("TenantDisplayName")
.withSubjectDisplayName("SubjectDisplayName"))
.withStatus(Status.ELEVATE)
.withSubStatus(Substatus.APPROVED),
com.azure.core.util.Context.NONE);
public static void
updateAccessForApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().updateAccess("rg", "myManagedApplication", new UpdateAccessDefinitionInner()
.withApprover("amauser")
.withMetadata(new JitRequestMetadata().withOriginRequestId("originRequestId").withRequestorId("RequestorId")
.withTenantDisplayName("TenantDisplayName").withSubjectDisplayName("SubjectDisplayName"))
.withStatus(Status.ELEVATE).withSubStatus(Substatus.APPROVED), com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,27 +1,25 @@
import com.azure.resourcemanager.managedapplications.fluent.models.ApplicationPatchableInner;
/** Samples for Applications Update. */
/**
* Samples for Applications Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateApplication.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateApplication.json
*/
/**
* Sample code: Updates managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void updatesManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.update(
"rg",
"myManagedApplication",
new ApplicationPatchableInner()
.withKind("ServiceCatalog")
.withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
.withApplicationDefinitionId(
"/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"),
com.azure.core.util.Context.NONE);
public static void
updatesManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().update("rg", "myManagedApplication", new ApplicationPatchableInner()
.withKind("ServiceCatalog").withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
.withApplicationDefinitionId(
"/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"),
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,26 +1,28 @@
import com.azure.resourcemanager.managedapplications.fluent.models.ApplicationPatchableInner;
/** Samples for Applications UpdateById. */
/**
* Samples for Applications UpdateById.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateApplicationById.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateApplicationById.
* json
*/
/**
* Sample code: Updates an existing managed application.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void updatesAnExistingManagedApplication(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applications()
.updateById(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
new ApplicationPatchableInner()
.withKind("ServiceCatalog")
.withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
.withApplicationDefinitionId(
"/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"),
com.azure.core.util.Context.NONE);
public static void
updatesAnExistingManagedApplication(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager.applications().updateById(
"subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applications/myManagedApplication",
new ApplicationPatchableInner().withKind("ServiceCatalog")
.withManagedResourceGroupId("/subscriptions/subid/resourceGroups/myManagedRG")
.withApplicationDefinitionId(
"/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Solutions/applicationDefinitions/myAppDef"),
com.azure.core.util.Context.NONE);
}
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,26 +1,27 @@
import com.azure.resourcemanager.managedapplications.models.ApplicationDefinitionPatchable;
import com.azure.resourcemanager.managedapplications.models.ApplicationDefinition;
import java.util.HashMap;
import java.util.Map;
/** Samples for ApplicationDefinitions UpdateById. */
/**
* Samples for ApplicationDefinitions Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateApplicationDefinition.json
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/
* updateApplicationDefinition.json
*/
/**
* Sample code: Update managed application definition.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void updateManagedApplicationDefinition(
com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
manager
.applicationDefinitions()
.updateByIdWithResponse(
"rg",
"myManagedApplicationDef",
new ApplicationDefinitionPatchable().withTags(mapOf("department", "Finance")),
com.azure.core.util.Context.NONE);
public static void
updateManagedApplicationDefinition(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
ApplicationDefinition resource = manager.applicationDefinitions()
.getByResourceGroupWithResponse("rg", "myManagedApplicationDef", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("department", "Finance")).apply();
}
// Use "Map.of" if available

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}

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

@ -1,23 +1,24 @@
import com.azure.resourcemanager.managedapplications.models.JitRequestDefinition;
import java.util.HashMap;
import java.util.Map;
/** Samples for JitRequests Update. */
/**
* Samples for JitRequests Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateJitRequest.json
* x-ms-original-file:
* specification/solutions/resource-manager/Microsoft.Solutions/stable/2021-07-01/examples/updateJitRequest.json
*/
/**
* Sample code: Update jit request.
*
*
* @param manager Entry point to ApplicationManager.
*/
public static void updateJitRequest(com.azure.resourcemanager.managedapplications.ApplicationManager manager) {
JitRequestDefinition resource =
manager
.jitRequests()
.getByResourceGroupWithResponse("rg", "myJitRequest", com.azure.core.util.Context.NONE)
.getValue();
JitRequestDefinition resource = manager.jitRequests()
.getByResourceGroupWithResponse("rg", "myJitRequest", com.azure.core.util.Context.NONE).getValue();
resource.update().withTags(mapOf("department", "Finance")).apply();
}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.3/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-managedapplications_1.0.0-beta.4/sdk/managedapplications/azure-resourcemanager-managedapplications/README.md"}