Tworzenie przepływu danychProfileResource
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}?api-version=2024-11-01
Parametry identyfikatora URI
Nazwa |
W |
Wymagane |
Typ |
Opis |
dataflowProfileName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Nazwa zasobu Przepływu danych wystąpieniaProfile
|
instanceName
|
path |
True
|
string
minLength: 3 maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$
|
Nazwa wystąpienia.
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Identyfikator subskrypcji docelowej. Wartość musi być identyfikatorem UUID.
|
api-version
|
query |
True
|
string
minLength: 1
|
Wersja interfejsu API do użycia dla tej operacji.
|
Treść żądania
Odpowiedzi
Nazwa |
Typ |
Opis |
200 OK
|
DataflowProfileResource
|
Operacja aktualizacji zasobu "DataflowProfileResource" powiodła się
|
201 Created
|
DataflowProfileResource
|
Operacja tworzenia zasobu "DataflowProfileResource" powiodła się
Nagłówki
- Azure-AsyncOperation: string
- Retry-After: integer
|
Other Status Codes
|
ErrorResponse
|
Nieoczekiwana odpowiedź na błąd.
|
Zabezpieczenia
azure_auth
Przepływ protokołu OAuth2 usługi Azure Active Directory.
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
Nazwa |
Opis |
user_impersonation
|
personifikacja konta użytkownika
|
Przykłady
DataflowProfile_CreateOrUpdate
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123?api-version=2024-11-01
{
"properties": {
"diagnostics": {
"logs": {
"level": "rnmwokumdmebpmfxxxzvvjfdywotav"
},
"metrics": {
"prometheusPort": 7581
}
},
"instanceCount": 14
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowProfileProperties;
import com.azure.resourcemanager.iotoperations.models.DiagnosticsLogs;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
import com.azure.resourcemanager.iotoperations.models.Metrics;
import com.azure.resourcemanager.iotoperations.models.ProfileDiagnostics;
/**
* Samples for DataflowProfile CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json
*/
/**
* Sample code: DataflowProfile_CreateOrUpdate.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void
dataflowProfileCreateOrUpdate(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflowProfiles().define("resource-name123")
.withExistingInstance("rgiotoperations", "resource-name123")
.withExtendedLocation(
new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION))
.withProperties(new DataflowProfileProperties().withDiagnostics(
new ProfileDiagnostics().withLogs(new DiagnosticsLogs().withLevel("rnmwokumdmebpmfxxxzvvjfdywotav"))
.withMetrics(new Metrics().withPrometheusPort(7581)))
.withInstanceCount(14))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_profile_create_or_update_maximum_set_gen.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow_profile.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="resource-name123",
resource={
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
"properties": {
"diagnostics": {
"logs": {"level": "rnmwokumdmebpmfxxxzvvjfdywotav"},
"metrics": {"prometheusPort": 7581},
},
"instanceCount": 14,
},
},
).result()
print(response)
# x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json
func ExampleDataflowProfileClient_BeginCreateOrUpdate_dataflowProfileCreateOrUpdate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowProfileClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.DataflowProfileResource{
Properties: &armiotoperations.DataflowProfileProperties{
Diagnostics: &armiotoperations.ProfileDiagnostics{
Logs: &armiotoperations.DiagnosticsLogs{
Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
},
Metrics: &armiotoperations.Metrics{
PrometheusPort: to.Ptr[int32](7581),
},
},
InstanceCount: to.Ptr[int32](14),
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowProfileClientCreateOrUpdateResponse{
// DataflowProfileResource: &armiotoperations.DataflowProfileResource{
// Properties: &armiotoperations.DataflowProfileProperties{
// Diagnostics: &armiotoperations.ProfileDiagnostics{
// Logs: &armiotoperations.DiagnosticsLogs{
// Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
// },
// Metrics: &armiotoperations.Metrics{
// PrometheusPort: to.Ptr[int32](7581),
// },
// },
// InstanceCount: to.Ptr[int32](14),
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"),
// Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"),
// Type: to.Ptr("ejvancsomtbapgztnerhlvx"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("gnicpuszwd"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.IotOperations.Models;
using Azure.ResourceManager.IotOperations;
// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json
// this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this IotOperationsInstanceResource created on azure
// for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource
string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
string resourceGroupName = "rgiotoperations";
string instanceName = "resource-name123";
ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName);
IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId);
// get the collection of this IotOperationsDataflowProfileResource
IotOperationsDataflowProfileCollection collection = iotOperationsInstance.GetIotOperationsDataflowProfiles();
// invoke the operation
string dataflowProfileName = "resource-name123";
IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation))
{
Properties = new IotOperationsDataflowProfileProperties
{
Diagnostics = new DataflowProfileDiagnostics
{
LogsLevel = "rnmwokumdmebpmfxxxzvvjfdywotav",
MetricsPrometheusPort = 7581,
},
InstanceCount = 14,
},
};
ArmOperation<IotOperationsDataflowProfileResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowProfileName, data);
IotOperationsDataflowProfileResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
IotOperationsDataflowProfileData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"properties": {
"diagnostics": {
"logs": {
"level": "rnmwokumdmebpmfxxxzvvjfdywotav"
},
"metrics": {
"prometheusPort": 7581
}
},
"instanceCount": 14,
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123",
"name": "bwhcjsnnfnrmbixamyxjau",
"type": "ejvancsomtbapgztnerhlvx",
"systemData": {
"createdBy": "ssvaslsmudloholronopqyxjcu",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "gnicpuszwd",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"diagnostics": {
"logs": {
"level": "rnmwokumdmebpmfxxxzvvjfdywotav"
},
"metrics": {
"prometheusPort": 7581
}
},
"instanceCount": 14,
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123",
"name": "bwhcjsnnfnrmbixamyxjau",
"type": "ejvancsomtbapgztnerhlvx",
"systemData": {
"createdBy": "ssvaslsmudloholronopqyxjcu",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "gnicpuszwd",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
DataflowProfile_CreateOrUpdate_Minimal
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/aio-dataflowprofile?api-version=2024-11-01
{
"properties": {
"instanceCount": 1
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowProfileProperties;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
/**
* Samples for DataflowProfile CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json
*/
/**
* Sample code: DataflowProfile_CreateOrUpdate_Minimal.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void
dataflowProfileCreateOrUpdateMinimal(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflowProfiles().define("aio-dataflowprofile")
.withExistingInstance("rgiotoperations", "resource-name123")
.withExtendedLocation(
new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION))
.withProperties(new DataflowProfileProperties().withInstanceCount(1)).create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_profile_create_or_update_minimal.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow_profile.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="aio-dataflowprofile",
resource={
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
"properties": {"instanceCount": 1},
},
).result()
print(response)
# x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json
func ExampleDataflowProfileClient_BeginCreateOrUpdate_dataflowProfileCreateOrUpdateMinimal() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowProfileClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "aio-dataflowprofile", armiotoperations.DataflowProfileResource{
Properties: &armiotoperations.DataflowProfileProperties{
InstanceCount: to.Ptr[int32](1),
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowProfileClientCreateOrUpdateResponse{
// DataflowProfileResource: &armiotoperations.DataflowProfileResource{
// Properties: &armiotoperations.DataflowProfileProperties{
// InstanceCount: to.Ptr[int32](1),
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"),
// Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"),
// Type: to.Ptr("ejvancsomtbapgztnerhlvx"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("gnicpuszwd"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.IotOperations.Models;
using Azure.ResourceManager.IotOperations;
// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json
// this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this IotOperationsInstanceResource created on azure
// for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource
string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
string resourceGroupName = "rgiotoperations";
string instanceName = "resource-name123";
ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName);
IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId);
// get the collection of this IotOperationsDataflowProfileResource
IotOperationsDataflowProfileCollection collection = iotOperationsInstance.GetIotOperationsDataflowProfiles();
// invoke the operation
string dataflowProfileName = "aio-dataflowprofile";
IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation))
{
Properties = new IotOperationsDataflowProfileProperties
{
InstanceCount = 1,
},
};
ArmOperation<IotOperationsDataflowProfileResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowProfileName, data);
IotOperationsDataflowProfileResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
IotOperationsDataflowProfileData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"properties": {
"instanceCount": 1,
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123",
"name": "bwhcjsnnfnrmbixamyxjau",
"type": "ejvancsomtbapgztnerhlvx",
"systemData": {
"createdBy": "ssvaslsmudloholronopqyxjcu",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "gnicpuszwd",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"instanceCount": 1,
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123",
"name": "bwhcjsnnfnrmbixamyxjau",
"type": "ejvancsomtbapgztnerhlvx",
"systemData": {
"createdBy": "ssvaslsmudloholronopqyxjcu",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "gnicpuszwd",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
DataflowProfile_CreateOrUpdate_Multi
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/F8C729F9-DF9C-4743-848F-96EE433D8E53/resourceGroups/rgiotoperations/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/aio-dataflowprofile?api-version=2024-11-01
{
"properties": {
"instanceCount": 3
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
}
}
import com.azure.resourcemanager.iotoperations.models.DataflowProfileProperties;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocation;
import com.azure.resourcemanager.iotoperations.models.ExtendedLocationType;
/**
* Samples for DataflowProfile CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json
*/
/**
* Sample code: DataflowProfile_CreateOrUpdate_Multi.
*
* @param manager Entry point to IoTOperationsManager.
*/
public static void
dataflowProfileCreateOrUpdateMulti(com.azure.resourcemanager.iotoperations.IoTOperationsManager manager) {
manager.dataflowProfiles().define("aio-dataflowprofile")
.withExistingInstance("rgiotoperations", "resource-name123")
.withExtendedLocation(
new ExtendedLocation().withName("qmbrfwcpwwhggszhrdjv").withType(ExtendedLocationType.CUSTOM_LOCATION))
.withProperties(new DataflowProfileProperties().withInstanceCount(3)).create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.iotoperations import IoTOperationsMgmtClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-iotoperations
# USAGE
python dataflow_profile_create_or_update_multi.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = IoTOperationsMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.dataflow_profile.begin_create_or_update(
resource_group_name="rgiotoperations",
instance_name="resource-name123",
dataflow_profile_name="aio-dataflowprofile",
resource={
"extendedLocation": {"name": "qmbrfwcpwwhggszhrdjv", "type": "CustomLocation"},
"properties": {"instanceCount": 3},
},
).result()
print(response)
# x-ms-original-file: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armiotoperations_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotoperations/armiotoperations"
)
// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json
func ExampleDataflowProfileClient_BeginCreateOrUpdate_dataflowProfileCreateOrUpdateMulti() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armiotoperations.NewClientFactory("F8C729F9-DF9C-4743-848F-96EE433D8E53", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewDataflowProfileClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "aio-dataflowprofile", armiotoperations.DataflowProfileResource{
Properties: &armiotoperations.DataflowProfileProperties{
InstanceCount: to.Ptr[int32](3),
},
ExtendedLocation: &armiotoperations.ExtendedLocation{
Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armiotoperations.DataflowProfileClientCreateOrUpdateResponse{
// DataflowProfileResource: &armiotoperations.DataflowProfileResource{
// Properties: &armiotoperations.DataflowProfileProperties{
// InstanceCount: to.Ptr[int32](3),
// ProvisioningState: to.Ptr(armiotoperations.ProvisioningStateSucceeded),
// },
// ExtendedLocation: &armiotoperations.ExtendedLocation{
// Name: to.Ptr("qmbrfwcpwwhggszhrdjv"),
// Type: to.Ptr(armiotoperations.ExtendedLocationTypeCustomLocation),
// },
// ID: to.Ptr("/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123"),
// Name: to.Ptr("bwhcjsnnfnrmbixamyxjau"),
// Type: to.Ptr("ejvancsomtbapgztnerhlvx"),
// SystemData: &armiotoperations.SystemData{
// CreatedBy: to.Ptr("ssvaslsmudloholronopqyxjcu"),
// CreatedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// LastModifiedBy: to.Ptr("gnicpuszwd"),
// LastModifiedByType: to.Ptr(armiotoperations.CreatedByTypeUser),
// LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-08-09T18:13:29.389Z"); return t}()),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.IotOperations.Models;
using Azure.ResourceManager.IotOperations;
// Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json
// this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this IotOperationsInstanceResource created on azure
// for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource
string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53";
string resourceGroupName = "rgiotoperations";
string instanceName = "resource-name123";
ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName);
IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId);
// get the collection of this IotOperationsDataflowProfileResource
IotOperationsDataflowProfileCollection collection = iotOperationsInstance.GetIotOperationsDataflowProfiles();
// invoke the operation
string dataflowProfileName = "aio-dataflowprofile";
IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation))
{
Properties = new IotOperationsDataflowProfileProperties
{
InstanceCount = 3,
},
};
ArmOperation<IotOperationsDataflowProfileResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowProfileName, data);
IotOperationsDataflowProfileResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
IotOperationsDataflowProfileData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"properties": {
"instanceCount": 3,
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123",
"name": "bwhcjsnnfnrmbixamyxjau",
"type": "ejvancsomtbapgztnerhlvx",
"systemData": {
"createdBy": "ssvaslsmudloholronopqyxjcu",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "gnicpuszwd",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"instanceCount": 3,
"provisioningState": "Succeeded"
},
"extendedLocation": {
"name": "qmbrfwcpwwhggszhrdjv",
"type": "CustomLocation"
},
"id": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123",
"name": "bwhcjsnnfnrmbixamyxjau",
"type": "ejvancsomtbapgztnerhlvx",
"systemData": {
"createdBy": "ssvaslsmudloholronopqyxjcu",
"createdByType": "User",
"createdAt": "2024-08-09T18:13:29.389Z",
"lastModifiedBy": "gnicpuszwd",
"lastModifiedByType": "User",
"lastModifiedAt": "2024-08-09T18:13:29.389Z"
}
}
Definicje
createdByType
Wyliczanie
Typ tożsamości, która utworzyła zasób.
Wartość |
Opis |
Application
|
|
Key
|
|
ManagedIdentity
|
|
User
|
|
DataflowProfileProperties
Objekt
Właściwości zasobu DataflowProfile
Nazwa |
Typ |
Domyślna wartość |
Opis |
diagnostics
|
ProfileDiagnostics
|
|
Specyfikacja definiuje żądane tożsamości ustawień diagnostycznych NBC.
|
instanceCount
|
integer
(int32)
minimum: 1 maximum: 20
|
1
|
Aby ręcznie skalować profil przepływu danych, określ maksymalną liczbę wystąpień, które chcesz uruchomić.
|
provisioningState
|
ProvisioningState
|
|
Stan ostatniej operacji.
|
DataflowProfileResource
Objekt
Zasób przepływu danych wystąpieniaProfile
Nazwa |
Typ |
Opis |
extendedLocation
|
ExtendedLocation
|
Lokalizacja krawędzi zasobu.
|
id
|
string
(arm-id)
|
W pełni kwalifikowany identyfikator zasobu dla zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
name
|
string
|
Nazwa zasobu
|
properties
|
DataflowProfileProperties
|
Właściwości specyficzne dla zasobu dla tego zasobu.
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje createdBy i modifiedBy.
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
DiagnosticsLogs
Objekt
Właściwości dziennika diagnostycznego
Nazwa |
Typ |
Domyślna wartość |
Opis |
level
|
string
|
info
|
Poziom dziennika. Przykłady — "debugowanie", "info", "warn", "error", "trace".
|
ErrorAdditionalInfo
Objekt
Dodatkowe informacje o błędzie zarządzania zasobami.
Nazwa |
Typ |
Opis |
info
|
object
|
Dodatkowe informacje.
|
type
|
string
|
Dodatkowy typ informacji.
|
ErrorDetail
Objekt
Szczegóły błędu.
Nazwa |
Typ |
Opis |
additionalInfo
|
ErrorAdditionalInfo[]
|
Dodatkowe informacje o błędzie.
|
code
|
string
|
Kod błędu.
|
details
|
ErrorDetail[]
|
Szczegóły błędu.
|
message
|
string
|
Komunikat o błędzie.
|
target
|
string
|
Element docelowy błędu.
|
ErrorResponse
Objekt
Odpowiedź na błąd
ExtendedLocation
Objekt
Lokalizacja rozszerzona to rozszerzenie lokalizacji platformy Azure. Zapewniają one sposób używania klastrów Kubernetes z włączoną usługą Azure ARC jako lokalizacji docelowych do wdrażania wystąpień usług platformy Azure.
Nazwa |
Typ |
Opis |
name
|
string
|
Nazwa lokalizacji rozszerzonej.
|
type
|
ExtendedLocationType
|
Typ extendedLocation.
|
ExtendedLocationType
Wyliczanie
Wyliczenie definiujące typ zaakceptowanej funkcji ExtendedLocation.
Wartość |
Opis |
CustomLocation
|
Typ customLocation
|
Metrics
Objekt
Właściwości metryk diagnostycznych
Nazwa |
Typ |
Domyślna wartość |
Opis |
prometheusPort
|
integer
(int32)
minimum: 0 maximum: 65535
|
9600
|
Port prometheus umożliwiający uwidocznienie metryk.
|
ProfileDiagnostics
Objekt
Właściwości diagnostyki przepływu danychProfile
Nazwa |
Typ |
Opis |
logs
|
DiagnosticsLogs
|
Ustawienia dziennika diagnostycznego dla zasobu.
|
metrics
|
Metrics
|
Ustawienia metryk dla zasobu.
|
ProvisioningState
Wyliczanie
Wyliczenie definiujące stan zasobu.
Wartość |
Opis |
Accepted
|
Zasób został zaakceptowany.
|
Canceled
|
Tworzenie zasobów zostało anulowane.
|
Deleting
|
Zasób jest usuwany.
|
Failed
|
Tworzenie zasobu nie powiodło się.
|
Provisioning
|
Zasób jest aprowizowany.
|
Succeeded
|
Zasób został utworzony.
|
Updating
|
Zasób jest aktualizowany.
|
systemData
Objekt
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
Nazwa |
Typ |
Opis |
createdAt
|
string
(date-time)
|
Sygnatura czasowa tworzenia zasobu (UTC).
|
createdBy
|
string
|
Tożsamość, która utworzyła zasób.
|
createdByType
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
lastModifiedAt
|
string
(date-time)
|
Znacznik czasu ostatniej modyfikacji zasobu (UTC)
|
lastModifiedBy
|
string
|
Tożsamość, która ostatnio zmodyfikowała zasób.
|
lastModifiedByType
|
createdByType
|
Typ tożsamości, która ostatnio zmodyfikowała zasób.
|