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

This commit is contained in:
Azure SDK Bot 2024-11-02 04:03:47 -07:00 коммит произвёл GitHub
Родитель f20c2c4e17
Коммит b9abdba9b2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
46 изменённых файлов: 289 добавлений и 227 удалений

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

@ -1,25 +1,24 @@
import com.azure.resourcemanager.timeseriesinsights.models.AccessPolicyRole;
import java.util.Arrays;
/** Samples for AccessPolicies CreateOrUpdate. */
/**
* Samples for AccessPolicies CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/AccessPoliciesCreate.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* AccessPoliciesCreate.json
*/
/**
* Sample code: AccessPoliciesCreate.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void accessPoliciesCreate(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager
.accessPolicies()
.define("ap1")
.withExistingEnvironment("rg1", "env1")
.withPrincipalObjectId("aGuid")
.withDescription("some description")
.withRoles(Arrays.asList(AccessPolicyRole.READER))
.create();
public static void
accessPoliciesCreate(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.accessPolicies().define("ap1").withExistingEnvironment("rg1", "env1").withPrincipalObjectId("aGuid")
.withDescription("some description").withRoles(Arrays.asList(AccessPolicyRole.READER)).create();
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for AccessPolicies Delete. */
/**
* Samples for AccessPolicies Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/AccessPoliciesDelete.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* AccessPoliciesDelete.json
*/
/**
* Sample code: AccessPoliciesDelete.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void accessPoliciesDelete(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
accessPoliciesDelete(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.accessPolicies().deleteWithResponse("rg1", "env1", "ap1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for AccessPolicies Get. */
/**
* Samples for AccessPolicies Get.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/AccessPoliciesGet.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* AccessPoliciesGet.json
*/
/**
* Sample code: AccessPoliciesGet.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void accessPoliciesGet(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
accessPoliciesGet(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.accessPolicies().getWithResponse("rg1", "env1", "ap1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for AccessPolicies ListByEnvironment. */
/**
* Samples for AccessPolicies ListByEnvironment.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/AccessPoliciesListByEnvironment.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* AccessPoliciesListByEnvironment.json
*/
/**
* Sample code: AccessPoliciesByEnvironment.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void accessPoliciesByEnvironment(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
accessPoliciesByEnvironment(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.accessPolicies().listByEnvironmentWithResponse("rg1", "env1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,21 +1,26 @@
import com.azure.resourcemanager.timeseriesinsights.models.AccessPolicyResource;
import com.azure.resourcemanager.timeseriesinsights.models.AccessPolicyRole;
import java.util.Arrays;
/** Samples for AccessPolicies Update. */
/**
* Samples for AccessPolicies Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/AccessPoliciesPatchRoles.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* AccessPoliciesPatchRoles.json
*/
/**
* Sample code: AccessPoliciesUpdate.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void accessPoliciesUpdate(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
AccessPolicyResource resource =
manager.accessPolicies().getWithResponse("rg1", "env1", "ap1", com.azure.core.util.Context.NONE).getValue();
public static void
accessPoliciesUpdate(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
AccessPolicyResource resource = manager.accessPolicies()
.getWithResponse("rg1", "env1", "ap1", com.azure.core.util.Context.NONE).getValue();
resource.update().withRoles(Arrays.asList(AccessPolicyRole.READER, AccessPolicyRole.CONTRIBUTOR)).apply();
}
}

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

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

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

@ -1,3 +1,4 @@
import com.azure.resourcemanager.timeseriesinsights.models.Gen1EnvironmentCreateOrUpdateParameters;
import com.azure.resourcemanager.timeseriesinsights.models.PropertyType;
import com.azure.resourcemanager.timeseriesinsights.models.Sku;
@ -6,29 +7,27 @@ import com.azure.resourcemanager.timeseriesinsights.models.TimeSeriesIdProperty;
import java.time.Duration;
import java.util.Arrays;
/** Samples for Environments CreateOrUpdate. */
/**
* Samples for Environments CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EnvironmentsCreate.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EnvironmentsCreate.json
*/
/**
* Sample code: EnvironmentsCreate.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void environmentsCreate(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager
.environments()
.createOrUpdate(
"rg1",
"env1",
new Gen1EnvironmentCreateOrUpdateParameters()
.withLocation("West US")
.withSku(new Sku().withName(SkuName.S1).withCapacity(1))
.withDataRetentionTime(Duration.parse("P31D"))
.withPartitionKeyProperties(
Arrays.asList(new TimeSeriesIdProperty().withName("DeviceId1").withType(PropertyType.STRING))),
com.azure.core.util.Context.NONE);
public static void
environmentsCreate(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.environments().createOrUpdate("rg1", "env1",
new Gen1EnvironmentCreateOrUpdateParameters().withLocation("West US")
.withSku(new Sku().withName(SkuName.S1).withCapacity(1)).withDataRetentionTime(Duration.parse("P31D"))
.withPartitionKeyProperties(
Arrays.asList(new TimeSeriesIdProperty().withName("DeviceId1").withType(PropertyType.STRING))),
com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for Environments Delete. */
/**
* Samples for Environments Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EnvironmentsDelete.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EnvironmentsDelete.json
*/
/**
* Sample code: EnvironmentsDelete.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void environmentsDelete(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
environmentsDelete(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.environments().deleteByResourceGroupWithResponse("rg1", "env1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,11 +1,16 @@
/** Samples for Environments GetByResourceGroup. */
/**
* Samples for Environments GetByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EnvironmentsGet.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EnvironmentsGet.json
*/
/**
* Sample code: EnvironmentsGet.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void environmentsGet(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {

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

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

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

@ -1,15 +1,20 @@
/** Samples for Environments ListByResourceGroup. */
/**
* Samples for Environments ListByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EnvironmentsListByResourceGroup.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EnvironmentsListByResourceGroup.json
*/
/**
* Sample code: EnvironmentsByResourceGroup.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void environmentsByResourceGroup(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
environmentsByResourceGroup(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.environments().listByResourceGroupWithResponse("rg1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for Environments ListBySubscription. */
/**
* Samples for Environments ListBySubscription.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EnvironmentsListBySubscription.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EnvironmentsListBySubscription.json
*/
/**
* Sample code: EnvironmentsBySubscription.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void environmentsBySubscription(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
environmentsBySubscription(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.environments().listBySubscriptionWithResponse(com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,28 +1,30 @@
import com.azure.resourcemanager.timeseriesinsights.models.EnvironmentUpdateParameters;
import java.util.HashMap;
import java.util.Map;
/** Samples for Environments Update. */
/**
* Samples for Environments Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EnvironmentsPatchTags.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EnvironmentsPatchTags.json
*/
/**
* Sample code: EnvironmentsUpdate.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void environmentsUpdate(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager
.environments()
.update(
"rg1",
"env1",
new EnvironmentUpdateParameters().withTags(mapOf("someTag", "someTagValue")),
com.azure.core.util.Context.NONE);
public static void
environmentsUpdate(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.environments().update("rg1", "env1",
new EnvironmentUpdateParameters().withTags(mapOf("someTag", "someTagValue")),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();

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

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

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

@ -1,42 +1,35 @@
import com.azure.resourcemanager.timeseriesinsights.models.EventHubEventSourceCreateOrUpdateParameters;
import com.azure.resourcemanager.timeseriesinsights.models.IngressStartAtType;
import com.azure.resourcemanager.timeseriesinsights.models.LocalTimestamp;
import com.azure.resourcemanager.timeseriesinsights.models.LocalTimestampFormat;
import com.azure.resourcemanager.timeseriesinsights.models.LocalTimestampTimeZoneOffset;
/** Samples for EventSources CreateOrUpdate. */
/**
* Samples for EventSources CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EventSourcesCreateEventHub.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EventSourcesCreateEventHub.json
*/
/**
* Sample code: CreateEventHubEventSource.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void createEventHubEventSource(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager
.eventSources()
.createOrUpdateWithResponse(
"rg1",
"env1",
"es1",
new EventHubEventSourceCreateOrUpdateParameters()
.withLocation("West US")
.withSharedAccessKey("fakeTokenPlaceholder")
.withServiceBusNamespace("sbn")
.withEventHubName("ehn")
.withConsumerGroupName("cgn")
.withKeyName("fakeTokenPlaceholder")
.withEventSourceResourceId("somePathInArm")
.withTimestampPropertyName("someTimestampProperty")
.withLocalTimestampPropertiesLocalTimestamp(
new LocalTimestamp()
.withFormat(LocalTimestampFormat.fromString("TimeSpan"))
.withTimeZoneOffset(
new LocalTimestampTimeZoneOffset().withPropertyName("someEventPropertyName")))
.withType(IngressStartAtType.EARLIEST_AVAILABLE),
com.azure.core.util.Context.NONE);
public static void
createEventHubEventSource(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.eventSources().createOrUpdateWithResponse("rg1", "env1", "es1",
new EventHubEventSourceCreateOrUpdateParameters().withLocation("West US")
.withSharedAccessKey("fakeTokenPlaceholder").withServiceBusNamespace("sbn").withEventHubName("ehn")
.withConsumerGroupName("cgn").withKeyName("fakeTokenPlaceholder")
.withEventSourceResourceId("somePathInArm").withTimestampPropertyName("someTimestampProperty")
.withLocalTimestampPropertiesLocalTimestamp(
new LocalTimestamp().withFormat(LocalTimestampFormat.fromString("TimeSpan")).withTimeZoneOffset(
new LocalTimestampTimeZoneOffset().withPropertyName("someEventPropertyName")))
.withType(IngressStartAtType.EARLIEST_AVAILABLE),
com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,35 +1,29 @@
import com.azure.resourcemanager.timeseriesinsights.models.EventHubEventSourceCreateOrUpdateParameters;
import com.azure.resourcemanager.timeseriesinsights.models.IngressStartAtType;
/** Samples for EventSources CreateOrUpdate. */
/**
* Samples for EventSources CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EventSourcesCreateEventHubWithCustomEnquedTime.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EventSourcesCreateEventHubWithCustomEnquedTime.json
*/
/**
* Sample code: EventSourcesCreateEventHubWithCustomEnquedTime.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void eventSourcesCreateEventHubWithCustomEnquedTime(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager
.eventSources()
.createOrUpdateWithResponse(
"rg1",
"env1",
"es1",
new EventHubEventSourceCreateOrUpdateParameters()
.withLocation("West US")
.withSharedAccessKey("fakeTokenPlaceholder")
.withServiceBusNamespace("sbn")
.withEventHubName("ehn")
.withConsumerGroupName("cgn")
.withKeyName("fakeTokenPlaceholder")
.withEventSourceResourceId("somePathInArm")
.withTimestampPropertyName("someTimestampProperty")
.withType(IngressStartAtType.CUSTOM_ENQUEUED_TIME)
.withTime("2017-04-01T19:20:33.2288820Z"),
com.azure.core.util.Context.NONE);
manager.eventSources().createOrUpdateWithResponse("rg1", "env1", "es1",
new EventHubEventSourceCreateOrUpdateParameters().withLocation("West US")
.withSharedAccessKey("fakeTokenPlaceholder").withServiceBusNamespace("sbn").withEventHubName("ehn")
.withConsumerGroupName("cgn").withKeyName("fakeTokenPlaceholder")
.withEventSourceResourceId("somePathInArm").withTimestampPropertyName("someTimestampProperty")
.withType(IngressStartAtType.CUSTOM_ENQUEUED_TIME).withTime("2017-04-01T19:20:33.2288820Z"),
com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for EventSources Delete. */
/**
* Samples for EventSources Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EventSourcesDelete.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EventSourcesDelete.json
*/
/**
* Sample code: DeleteEventSource.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void deleteEventSource(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
deleteEventSource(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.eventSources().deleteWithResponse("rg1", "env1", "es1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for EventSources Get. */
/**
* Samples for EventSources Get.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EventSourcesGetEventHub.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EventSourcesGetEventHub.json
*/
/**
* Sample code: GetEventHubEventSource.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void getEventHubEventSource(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
getEventHubEventSource(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.eventSources().getWithResponse("rg1", "env1", "es1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for EventSources ListByEnvironment. */
/**
* Samples for EventSources ListByEnvironment.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EventSourcesListByEnvironment.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EventSourcesListByEnvironment.json
*/
/**
* Sample code: ListEventSourcesByEnvironment.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void listEventSourcesByEnvironment(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
listEventSourcesByEnvironment(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.eventSources().listByEnvironmentWithResponse("rg1", "env1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,29 +1,30 @@
import com.azure.resourcemanager.timeseriesinsights.models.EventSourceUpdateParameters;
import java.util.HashMap;
import java.util.Map;
/** Samples for EventSources Update. */
/**
* Samples for EventSources Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/EventSourcesPatchTags.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* EventSourcesPatchTags.json
*/
/**
* Sample code: UpdateEventSource.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void updateEventSource(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager
.eventSources()
.updateWithResponse(
"rg1",
"env1",
"es1",
new EventSourceUpdateParameters().withTags(mapOf("someKey", "someValue")),
com.azure.core.util.Context.NONE);
public static void
updateEventSource(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.eventSources().updateWithResponse("rg1", "env1", "es1",
new EventSourceUpdateParameters().withTags(mapOf("someKey", "fakeTokenPlaceholder")),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();

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

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

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

@ -1,11 +1,16 @@
/** Samples for Operations List. */
/**
* Samples for Operations List.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/Operation_List.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* Operation_List.json
*/
/**
* Sample code: List available operations for the Time Series Insights resource provider.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void listAvailableOperationsForTheTimeSeriesInsightsResourceProvider(

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

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

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

@ -1,33 +1,29 @@
import com.azure.resourcemanager.timeseriesinsights.models.ReferenceDataKeyPropertyType;
import com.azure.resourcemanager.timeseriesinsights.models.ReferenceDataSetKeyProperty;
import java.util.Arrays;
/** Samples for ReferenceDataSets CreateOrUpdate. */
/**
* Samples for ReferenceDataSets CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/ReferenceDataSetsCreate.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* ReferenceDataSetsCreate.json
*/
/**
* Sample code: ReferenceDataSetsCreate.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void referenceDataSetsCreate(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager
.referenceDataSets()
.define("rds1")
.withRegion("West US")
.withExistingEnvironment("rg1", "env1")
.withKeyProperties(
Arrays
.asList(
new ReferenceDataSetKeyProperty()
.withName("DeviceId1")
.withType(ReferenceDataKeyPropertyType.STRING),
new ReferenceDataSetKeyProperty()
.withName("DeviceFloor")
.withType(ReferenceDataKeyPropertyType.DOUBLE)))
public static void
referenceDataSetsCreate(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.referenceDataSets().define("rds1").withRegion("West US").withExistingEnvironment("rg1", "env1")
.withKeyProperties(Arrays.asList(
new ReferenceDataSetKeyProperty().withName("DeviceId1").withType(ReferenceDataKeyPropertyType.STRING),
new ReferenceDataSetKeyProperty().withName("DeviceFloor")
.withType(ReferenceDataKeyPropertyType.DOUBLE)))
.create();
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for ReferenceDataSets Delete. */
/**
* Samples for ReferenceDataSets Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/ReferenceDataSetsDelete.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* ReferenceDataSetsDelete.json
*/
/**
* Sample code: ReferenceDataSetsDelete.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void referenceDataSetsDelete(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
referenceDataSetsDelete(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.referenceDataSets().deleteWithResponse("rg1", "env1", "rds1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,15 +1,20 @@
/** Samples for ReferenceDataSets Get. */
/**
* Samples for ReferenceDataSets Get.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/ReferenceDataSetsGet.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* ReferenceDataSetsGet.json
*/
/**
* Sample code: ReferenceDataSetsGet.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void referenceDataSetsGet(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
public static void
referenceDataSetsGet(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
manager.referenceDataSets().getWithResponse("rg1", "env1", "rds1", com.azure.core.util.Context.NONE);
}
}

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

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

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

@ -1,11 +1,16 @@
/** Samples for ReferenceDataSets ListByEnvironment. */
/**
* Samples for ReferenceDataSets ListByEnvironment.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/ReferenceDataSetsListByEnvironment.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* ReferenceDataSetsListByEnvironment.json
*/
/**
* Sample code: ReferenceDataSetsListByEnvironment.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void referenceDataSetsListByEnvironment(

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

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

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

@ -1,27 +1,30 @@
import com.azure.resourcemanager.timeseriesinsights.models.ReferenceDataSetResource;
import java.util.HashMap;
import java.util.Map;
/** Samples for ReferenceDataSets Update. */
/**
* Samples for ReferenceDataSets Update.
*/
public final class Main {
/*
* x-ms-original-file: specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/ReferenceDataSetsPatchTags.json
* x-ms-original-file:
* specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/examples/
* ReferenceDataSetsPatchTags.json
*/
/**
* Sample code: ReferenceDataSetsUpdate.
*
*
* @param manager Entry point to TimeSeriesInsightsManager.
*/
public static void referenceDataSetsUpdate(
com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
ReferenceDataSetResource resource =
manager
.referenceDataSets()
.getWithResponse("rg1", "env1", "rds1", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("someKey", "someValue")).apply();
public static void
referenceDataSetsUpdate(com.azure.resourcemanager.timeseriesinsights.TimeSeriesInsightsManager manager) {
ReferenceDataSetResource resource = manager.referenceDataSets()
.getWithResponse("rg1", "env1", "rds1", com.azure.core.util.Context.NONE).getValue();
resource.update().withTags(mapOf("someKey", "fakeTokenPlaceholder")).apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();

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

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