You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importcom.azure.resourcemanager.selfhelp.models.CheckNameAvailabilityRequest;
/** Samples for Diagnostics CheckNameAvailability. */publicfinalclassDiagnosticsCheckNameAvailabilitySamples {
/* * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CheckNameAvailabilityForDiagnosticWhenNameIsNotAvailable.json *//** * Sample code: Example when name is not available for a Diagnostic resource. * * @param manager Entry point to SelfHelpManager. */publicstaticvoidexampleWhenNameIsNotAvailableForADiagnosticResource(
com.azure.resourcemanager.selfhelp.SelfHelpManagermanager) {
manager
.diagnostics()
.checkNameAvailabilityWithResponse(
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6",
newCheckNameAvailabilityRequest().withName("sampleName").withType("Microsoft.Help/diagnostics"),
com.azure.core.util.Context.NONE);
}
/* * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CheckNameAvailabilityForDiagnosticWhenNameIsAvailable.json *//** * Sample code: Example when name is available for a Diagnostic resource. * * @param manager Entry point to SelfHelpManager. */publicstaticvoidexampleWhenNameIsAvailableForADiagnosticResource(
com.azure.resourcemanager.selfhelp.SelfHelpManagermanager) {
manager
.diagnostics()
.checkNameAvailabilityWithResponse(
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6",
newCheckNameAvailabilityRequest().withName("sampleName").withType("Microsoft.Help/diagnostics"),
com.azure.core.util.Context.NONE);
}
}
Diagnostics_Create
/** Samples for Diagnostics Create. */publicfinalclassDiagnosticsCreateSamples {
/* * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/CreateDiagnosticForKeyVaultResource.json *//** * Sample code: Creates a Diagnostic for a KeyVault resource. * * @param manager Entry point to SelfHelpManager. */publicstaticvoidcreatesADiagnosticForAKeyVaultResource(
com.azure.resourcemanager.selfhelp.SelfHelpManagermanager) {
manager
.diagnostics()
.define("VMNotWorkingInsight")
.withExistingScope(
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read")
.create();
}
}
Diagnostics_Get
/** Samples for Diagnostics Get. */publicfinalclassDiagnosticsGetSamples {
/* * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/GetDiagnosticForKeyVaultResource.json *//** * Sample code: Gets a Diagnostic for a KeyVault resource. * * @param manager Entry point to SelfHelpManager. */publicstaticvoidgetsADiagnosticForAKeyVaultResource(com.azure.resourcemanager.selfhelp.SelfHelpManagermanager) {
manager
.diagnostics()
.getWithResponse(
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read",
"VMNotWorkingInsight",
com.azure.core.util.Context.NONE);
}
}
DiscoverySolution_List
/** Samples for DiscoverySolution List. */publicfinalclassDiscoverySolutionListSamples {
/* * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/ListDiscoverySolutionsForKeyVaultResource.json *//** * Sample code: List DiscoverySolutions for a KeyVault resource. * * @param manager Entry point to SelfHelpManager. */publicstaticvoidlistDiscoverySolutionsForAKeyVaultResource(
com.azure.resourcemanager.selfhelp.SelfHelpManagermanager) {
manager
.discoverySolutions()
.list(
"subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read",
null,
null,
com.azure.core.util.Context.NONE);
}
}
Operations_List
/** Samples for Operations List. */publicfinalclassOperationsListSamples {
/* * x-ms-original-file: specification/help/resource-manager/Microsoft.Help/stable/2023-06-01/examples/ListOperations.json *//** * Sample code: List All Operations. * * @param manager Entry point to SelfHelpManager. */publicstaticvoidlistAllOperations(com.azure.resourcemanager.selfhelp.SelfHelpManagermanager) {
manager.operations().list(com.azure.core.util.Context.NONE);
}
}