[Automation] Collect examples from azure-sdk-for-go#sdk/resourcemanager/iotoperations/armiotoperations/v0.1.0

This commit is contained in:
Azure SDK Bot 2024-10-29 04:03:06 -07:00 коммит произвёл GitHub
Родитель 235d1d3a6f
Коммит 250ca20ef0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
118 изменённых файлов: 6666 добавлений и 0 удалений

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

@ -0,0 +1,137 @@
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/BrokerAuthentication_CreateOrUpdate_Complex.json
func ExampleBrokerAuthenticationClient_BeginCreateOrUpdate_brokerAuthenticationCreateOrUpdateComplex() {
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.NewBrokerAuthenticationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthenticationResource{
Properties: &armiotoperations.BrokerAuthenticationProperties{
AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{
{
Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodServiceAccountToken),
ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{
Audiences: []*string{
to.Ptr("aio-internal"),
},
},
},
{
Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodX509),
X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{
TrustedClientCaCert: to.Ptr("my-ca"),
AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{
"root": {
Subject: to.Ptr("CN = Contoso Root CA Cert, OU = Engineering, C = US"),
Attributes: map[string]*string{
"organization": to.Ptr("contoso"),
},
},
"intermediate": {
Subject: to.Ptr("CN = Contoso Intermediate CA"),
Attributes: map[string]*string{
"city": to.Ptr("seattle"),
"foo": to.Ptr("bar"),
},
},
"smart-fan": {
Subject: to.Ptr("CN = smart-fan"),
Attributes: map[string]*string{
"building": to.Ptr("17"),
},
},
},
},
},
},
},
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.BrokerAuthenticationClientCreateOrUpdateResponse{
// BrokerAuthenticationResource: &armiotoperations.BrokerAuthenticationResource{
// Properties: &armiotoperations.BrokerAuthenticationProperties{
// AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{
// {
// Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodServiceAccountToken),
// ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{
// Audiences: []*string{
// to.Ptr("aio-internal"),
// },
// },
// },
// {
// Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodX509),
// X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{
// TrustedClientCaCert: to.Ptr("my-ca"),
// AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// "root": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// Subject: to.Ptr("CN = Contoso Root CA Cert, OU = Engineering, C = US"),
// Attributes: map[string]*string{
// "organization": to.Ptr("contoso"),
// },
// },
// "intermediate": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// Subject: to.Ptr("CN = Contoso Intermediate CA"),
// Attributes: map[string]*string{
// "city": to.Ptr("seattle"),
// "foo": to.Ptr("bar"),
// },
// },
// "smart-fan": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// Subject: to.Ptr("CN = smart-fan"),
// Attributes: map[string]*string{
// "building": to.Ptr("17"),
// },
// },
// },
// },
// },
// },
// 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/brokers/resource-name123/authentications/resource-name123"),
// Name: to.Ptr("lwucizfvtsdpx"),
// Type: to.Ptr("kvtilkgcxanlfozrd"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,129 @@
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/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json
func ExampleBrokerAuthenticationClient_BeginCreateOrUpdate_brokerAuthenticationCreateOrUpdate() {
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.NewBrokerAuthenticationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthenticationResource{
Properties: &armiotoperations.BrokerAuthenticationProperties{
AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{
{
Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom),
CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{
Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{
X509: &armiotoperations.X509ManualCertificate{
SecretRef: to.Ptr("secret-name"),
},
},
CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"),
Endpoint: to.Ptr("https://www.example.com"),
Headers: map[string]*string{
"key8518": to.Ptr("bwityjy"),
},
},
ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{
Audiences: []*string{
to.Ptr("jqyhyqatuydg"),
},
},
X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{
AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{
"key3384": {
Attributes: map[string]*string{
"key186": to.Ptr("ucpajramsz"),
},
Subject: to.Ptr("jpgwctfeixitptfgfnqhua"),
},
},
TrustedClientCaCert: to.Ptr("vlctsqddl"),
},
},
},
},
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.BrokerAuthenticationClientCreateOrUpdateResponse{
// BrokerAuthenticationResource: &armiotoperations.BrokerAuthenticationResource{
// Properties: &armiotoperations.BrokerAuthenticationProperties{
// AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{
// {
// Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom),
// CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{
// Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{
// X509: &armiotoperations.X509ManualCertificate{
// SecretRef: to.Ptr("secret-name"),
// },
// },
// CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"),
// Endpoint: to.Ptr("https://www.example.com"),
// Headers: map[string]*string{
// "key8518": to.Ptr("bwityjy"),
// },
// },
// ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{
// Audiences: []*string{
// to.Ptr("jqyhyqatuydg"),
// },
// },
// X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{
// AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// "key3384": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// Attributes: map[string]*string{
// "key186": to.Ptr("ucpajramsz"),
// },
// Subject: to.Ptr("jpgwctfeixitptfgfnqhua"),
// },
// },
// TrustedClientCaCert: to.Ptr("vlctsqddl"),
// },
// },
// },
// 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/brokers/resource-name123/authentications/resource-name123"),
// Name: to.Ptr("lwucizfvtsdpx"),
// Type: to.Ptr("kvtilkgcxanlfozrd"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,30 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerAuthentication_Delete_MaximumSet_Gen.json
func ExampleBrokerAuthenticationClient_BeginDelete() {
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.NewBrokerAuthenticationClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,84 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerAuthentication_Get_MaximumSet_Gen.json
func ExampleBrokerAuthenticationClient_Get() {
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)
}
res, err := clientFactory.NewBrokerAuthenticationClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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.BrokerAuthenticationClientGetResponse{
// BrokerAuthenticationResource: &armiotoperations.BrokerAuthenticationResource{
// Properties: &armiotoperations.BrokerAuthenticationProperties{
// AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{
// {
// Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom),
// CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{
// Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{
// X509: &armiotoperations.X509ManualCertificate{
// SecretRef: to.Ptr("secret-name"),
// },
// },
// CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"),
// Endpoint: to.Ptr("https://www.example.com"),
// Headers: map[string]*string{
// "key8518": to.Ptr("bwityjy"),
// },
// },
// ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{
// Audiences: []*string{
// to.Ptr("jqyhyqatuydg"),
// },
// },
// X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{
// AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// "key3384": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// Attributes: map[string]*string{
// "key186": to.Ptr("ucpajramsz"),
// },
// Subject: to.Ptr("jpgwctfeixitptfgfnqhua"),
// },
// },
// TrustedClientCaCert: to.Ptr("vlctsqddl"),
// },
// },
// },
// 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/brokers/resource-name123/authentications/resource-name123"),
// Name: to.Ptr("lwucizfvtsdpx"),
// Type: to.Ptr("kvtilkgcxanlfozrd"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,94 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json
func ExampleBrokerAuthenticationClient_NewListByResourceGroupPager() {
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)
}
pager := clientFactory.NewBrokerAuthenticationClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", "resource-name123", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armiotoperations.BrokerAuthenticationClientListByResourceGroupResponse{
// BrokerAuthenticationResourceListResult: armiotoperations.BrokerAuthenticationResourceListResult{
// Value: []*armiotoperations.BrokerAuthenticationResource{
// {
// Properties: &armiotoperations.BrokerAuthenticationProperties{
// AuthenticationMethods: []*armiotoperations.BrokerAuthenticatorMethods{
// {
// Method: to.Ptr(armiotoperations.BrokerAuthenticationMethodCustom),
// CustomSettings: &armiotoperations.BrokerAuthenticatorMethodCustom{
// Auth: &armiotoperations.BrokerAuthenticatorCustomAuth{
// X509: &armiotoperations.X509ManualCertificate{
// SecretRef: to.Ptr("secret-name"),
// },
// },
// CaCertConfigMap: to.Ptr("pdecudefqyolvncbus"),
// Endpoint: to.Ptr("https://www.example.com"),
// Headers: map[string]*string{
// "key8518": to.Ptr("bwityjy"),
// },
// },
// ServiceAccountTokenSettings: &armiotoperations.BrokerAuthenticatorMethodSat{
// Audiences: []*string{
// to.Ptr("jqyhyqatuydg"),
// },
// },
// X509Settings: &armiotoperations.BrokerAuthenticatorMethodX509{
// AuthorizationAttributes: map[string]*armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// "key3384": &armiotoperations.BrokerAuthenticatorMethodX509Attributes{
// Attributes: map[string]*string{
// "key186": to.Ptr("ucpajramsz"),
// },
// Subject: to.Ptr("jpgwctfeixitptfgfnqhua"),
// },
// },
// TrustedClientCaCert: to.Ptr("vlctsqddl"),
// },
// },
// },
// 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/brokers/resource-name123/authentications/resource-name123"),
// Name: to.Ptr("lwucizfvtsdpx"),
// Type: to.Ptr("kvtilkgcxanlfozrd"),
// 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}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,179 @@
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/BrokerAuthorization_CreateOrUpdate_Complex.json
func ExampleBrokerAuthorizationClient_BeginCreateOrUpdate_brokerAuthorizationCreateOrUpdateComplex() {
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.NewBrokerAuthorizationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthorizationResource{
Properties: &armiotoperations.BrokerAuthorizationProperties{
AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
Rules: []*armiotoperations.AuthorizationRule{
{
Principals: &armiotoperations.PrincipalDefinition{
Usernames: []*string{
to.Ptr("temperature-sensor"),
to.Ptr("humidity-sensor"),
},
Attributes: []map[string]*string{
{
"building": to.Ptr("17"),
"organization": to.Ptr("contoso"),
},
},
},
BrokerResources: []*armiotoperations.BrokerResourceRule{
{
Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
ClientIDs: []*string{
to.Ptr("{principal.attributes.building}*"),
},
},
{
Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsPublish),
Topics: []*string{
to.Ptr("sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*"),
},
},
{
Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe),
Topics: []*string{
to.Ptr("commands/{principal.attributes.organization}"),
},
},
},
StateStoreResources: []*armiotoperations.StateStoreResourceRule{
{
Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead),
KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
Keys: []*string{
to.Ptr("myreadkey"),
to.Ptr("myotherkey?"),
to.Ptr("mynumerickeysuffix[0-9]"),
to.Ptr("clients:{principal.clientId}:*"),
},
},
{
Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite),
KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesBinary),
Keys: []*string{
to.Ptr("MTE2IDEwMSAxMTUgMTE2"),
},
},
},
},
},
},
},
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.BrokerAuthorizationClientCreateOrUpdateResponse{
// BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{
// Properties: &armiotoperations.BrokerAuthorizationProperties{
// AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
// Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
// Rules: []*armiotoperations.AuthorizationRule{
// {
// Principals: &armiotoperations.PrincipalDefinition{
// Usernames: []*string{
// to.Ptr("temperature-sensor"),
// to.Ptr("humidity-sensor"),
// },
// Attributes: []map[string]*string{
// map[string]*string{
// "building": to.Ptr("17"),
// "organization": to.Ptr("contoso"),
// },
// },
// },
// BrokerResources: []*armiotoperations.BrokerResourceRule{
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
// ClientIDs: []*string{
// to.Ptr("{principal.attributes.building}*"),
// },
// },
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsPublish),
// Topics: []*string{
// to.Ptr("sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*"),
// },
// },
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe),
// Topics: []*string{
// to.Ptr("commands/{principal.attributes.organization}"),
// },
// },
// },
// StateStoreResources: []*armiotoperations.StateStoreResourceRule{
// {
// Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead),
// KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
// Keys: []*string{
// to.Ptr("myreadkey"),
// to.Ptr("myotherkey?"),
// to.Ptr("mynumerickeysuffix[0-9]"),
// to.Ptr("clients:{principal.clientId}:*"),
// },
// },
// {
// Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite),
// KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesBinary),
// Keys: []*string{
// to.Ptr("MTE2IDEwMSAxMTUgMTE2"),
// },
// },
// },
// },
// },
// },
// 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/brokers/resource-name123/authorizations/resource-name123"),
// Name: to.Ptr("anqrqsvrjmlvzkrbuav"),
// Type: to.Ptr("yjlsfarshqoxojvgmy"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,143 @@
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/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json
func ExampleBrokerAuthorizationClient_BeginCreateOrUpdate_brokerAuthorizationCreateOrUpdate() {
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.NewBrokerAuthorizationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthorizationResource{
Properties: &armiotoperations.BrokerAuthorizationProperties{
AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
Rules: []*armiotoperations.AuthorizationRule{
{
BrokerResources: []*armiotoperations.BrokerResourceRule{
{
Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
ClientIDs: []*string{
to.Ptr("nlc"),
},
Topics: []*string{
to.Ptr("wvuca"),
},
},
},
Principals: &armiotoperations.PrincipalDefinition{
Attributes: []map[string]*string{
{
"key5526": to.Ptr("nydhzdhbldygqcn"),
},
},
ClientIDs: []*string{
to.Ptr("smopeaeddsygz"),
},
Usernames: []*string{
to.Ptr("iozngyqndrteikszkbasinzdjtm"),
},
},
StateStoreResources: []*armiotoperations.StateStoreResourceRule{
{
KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
Keys: []*string{
to.Ptr("tkounsqtwvzyaklxjqoerpu"),
},
Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead),
},
},
},
},
},
},
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.BrokerAuthorizationClientCreateOrUpdateResponse{
// BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{
// Properties: &armiotoperations.BrokerAuthorizationProperties{
// AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
// Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
// Rules: []*armiotoperations.AuthorizationRule{
// {
// BrokerResources: []*armiotoperations.BrokerResourceRule{
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
// ClientIDs: []*string{
// to.Ptr("nlc"),
// },
// Topics: []*string{
// to.Ptr("wvuca"),
// },
// },
// },
// Principals: &armiotoperations.PrincipalDefinition{
// Attributes: []map[string]*string{
// map[string]*string{
// "key5526": to.Ptr("nydhzdhbldygqcn"),
// },
// },
// ClientIDs: []*string{
// to.Ptr("smopeaeddsygz"),
// },
// Usernames: []*string{
// to.Ptr("iozngyqndrteikszkbasinzdjtm"),
// },
// },
// StateStoreResources: []*armiotoperations.StateStoreResourceRule{
// {
// KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
// Keys: []*string{
// to.Ptr("tkounsqtwvzyaklxjqoerpu"),
// },
// Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead),
// },
// },
// },
// },
// },
// 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/brokers/resource-name123/authorizations/resource-name123"),
// Name: to.Ptr("anqrqsvrjmlvzkrbuav"),
// Type: to.Ptr("yjlsfarshqoxojvgmy"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,141 @@
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/BrokerAuthorization_CreateOrUpdate_Simple.json
func ExampleBrokerAuthorizationClient_BeginCreateOrUpdate_brokerAuthorizationCreateOrUpdateSimple() {
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.NewBrokerAuthorizationClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerAuthorizationResource{
Properties: &armiotoperations.BrokerAuthorizationProperties{
AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
Rules: []*armiotoperations.AuthorizationRule{
{
Principals: &armiotoperations.PrincipalDefinition{
ClientIDs: []*string{
to.Ptr("my-client-id"),
},
Attributes: []map[string]*string{
{
"floor": to.Ptr("floor1"),
"site": to.Ptr("site1"),
},
},
},
BrokerResources: []*armiotoperations.BrokerResourceRule{
{
Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
},
{
Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe),
Topics: []*string{
to.Ptr("topic"),
to.Ptr("topic/with/wildcard/#"),
},
},
},
StateStoreResources: []*armiotoperations.StateStoreResourceRule{
{
Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite),
KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
Keys: []*string{
to.Ptr("*"),
},
},
},
},
},
},
},
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.BrokerAuthorizationClientCreateOrUpdateResponse{
// BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{
// Properties: &armiotoperations.BrokerAuthorizationProperties{
// AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
// Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
// Rules: []*armiotoperations.AuthorizationRule{
// {
// Principals: &armiotoperations.PrincipalDefinition{
// ClientIDs: []*string{
// to.Ptr("my-client-id"),
// },
// Attributes: []map[string]*string{
// map[string]*string{
// "floor": to.Ptr("floor1"),
// "site": to.Ptr("site1"),
// },
// },
// },
// BrokerResources: []*armiotoperations.BrokerResourceRule{
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
// },
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsSubscribe),
// Topics: []*string{
// to.Ptr("topic"),
// to.Ptr("topic/with/wildcard/#"),
// },
// },
// },
// StateStoreResources: []*armiotoperations.StateStoreResourceRule{
// {
// Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsReadWrite),
// KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
// Keys: []*string{
// to.Ptr("*"),
// },
// },
// },
// },
// },
// },
// 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/brokers/resource-name123/authorizations/resource-name123"),
// Name: to.Ptr("anqrqsvrjmlvzkrbuav"),
// Type: to.Ptr("yjlsfarshqoxojvgmy"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,30 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerAuthorization_Delete_MaximumSet_Gen.json
func ExampleBrokerAuthorizationClient_BeginDelete() {
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.NewBrokerAuthorizationClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,91 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerAuthorization_Get_MaximumSet_Gen.json
func ExampleBrokerAuthorizationClient_Get() {
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)
}
res, err := clientFactory.NewBrokerAuthorizationClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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.BrokerAuthorizationClientGetResponse{
// BrokerAuthorizationResource: &armiotoperations.BrokerAuthorizationResource{
// Properties: &armiotoperations.BrokerAuthorizationProperties{
// AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
// Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
// Rules: []*armiotoperations.AuthorizationRule{
// {
// BrokerResources: []*armiotoperations.BrokerResourceRule{
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
// ClientIDs: []*string{
// to.Ptr("nlc"),
// },
// Topics: []*string{
// to.Ptr("wvuca"),
// },
// },
// },
// Principals: &armiotoperations.PrincipalDefinition{
// Attributes: []map[string]*string{
// map[string]*string{
// "key5526": to.Ptr("nydhzdhbldygqcn"),
// },
// },
// ClientIDs: []*string{
// to.Ptr("smopeaeddsygz"),
// },
// Usernames: []*string{
// to.Ptr("iozngyqndrteikszkbasinzdjtm"),
// },
// },
// StateStoreResources: []*armiotoperations.StateStoreResourceRule{
// {
// KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
// Keys: []*string{
// to.Ptr("tkounsqtwvzyaklxjqoerpu"),
// },
// Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead),
// },
// },
// },
// },
// },
// 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/brokers/resource-name123/authorizations/resource-name123"),
// Name: to.Ptr("anqrqsvrjmlvzkrbuav"),
// Type: to.Ptr("yjlsfarshqoxojvgmy"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,101 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json
func ExampleBrokerAuthorizationClient_NewListByResourceGroupPager() {
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)
}
pager := clientFactory.NewBrokerAuthorizationClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", "resource-name123", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armiotoperations.BrokerAuthorizationClientListByResourceGroupResponse{
// BrokerAuthorizationResourceListResult: armiotoperations.BrokerAuthorizationResourceListResult{
// Value: []*armiotoperations.BrokerAuthorizationResource{
// {
// Properties: &armiotoperations.BrokerAuthorizationProperties{
// AuthorizationPolicies: &armiotoperations.AuthorizationConfig{
// Cache: to.Ptr(armiotoperations.OperationalModeEnabled),
// Rules: []*armiotoperations.AuthorizationRule{
// {
// BrokerResources: []*armiotoperations.BrokerResourceRule{
// {
// Method: to.Ptr(armiotoperations.BrokerResourceDefinitionMethodsConnect),
// ClientIDs: []*string{
// to.Ptr("nlc"),
// },
// Topics: []*string{
// to.Ptr("wvuca"),
// },
// },
// },
// Principals: &armiotoperations.PrincipalDefinition{
// Attributes: []map[string]*string{
// map[string]*string{
// "key5526": to.Ptr("nydhzdhbldygqcn"),
// },
// },
// ClientIDs: []*string{
// to.Ptr("smopeaeddsygz"),
// },
// Usernames: []*string{
// to.Ptr("iozngyqndrteikszkbasinzdjtm"),
// },
// },
// StateStoreResources: []*armiotoperations.StateStoreResourceRule{
// {
// KeyType: to.Ptr(armiotoperations.StateStoreResourceKeyTypesPattern),
// Keys: []*string{
// to.Ptr("tkounsqtwvzyaklxjqoerpu"),
// },
// Method: to.Ptr(armiotoperations.StateStoreResourceDefinitionMethodsRead),
// },
// },
// },
// },
// },
// 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/brokers/resource-name123/authorizations/resource-name123"),
// Name: to.Ptr("anqrqsvrjmlvzkrbuav"),
// Type: to.Ptr("yjlsfarshqoxojvgmy"),
// 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}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,138 @@
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/BrokerListener_CreateOrUpdate_Complex.json
func ExampleBrokerListenerClient_BeginCreateOrUpdate_brokerListenerCreateOrUpdateComplex() {
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.NewBrokerListenerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerListenerResource{
Properties: &armiotoperations.BrokerListenerProperties{
ServiceType: to.Ptr(armiotoperations.ServiceTypeLoadBalancer),
Ports: []*armiotoperations.ListenerPort{
{
Port: to.Ptr[int32](8080),
AuthenticationRef: to.Ptr("example-authentication"),
Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
},
{
Port: to.Ptr[int32](8443),
AuthenticationRef: to.Ptr("example-authentication"),
Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
TLS: &armiotoperations.TLSCertMethod{
Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic),
CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{
IssuerRef: &armiotoperations.CertManagerIssuerRef{
Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"),
Name: to.Ptr("example-issuer"),
Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer),
},
},
},
},
{
Port: to.Ptr[int32](1883),
AuthenticationRef: to.Ptr("example-authentication"),
},
{
Port: to.Ptr[int32](8883),
AuthenticationRef: to.Ptr("example-authentication"),
TLS: &armiotoperations.TLSCertMethod{
Mode: to.Ptr(armiotoperations.TLSCertMethodModeManual),
Manual: &armiotoperations.X509ManualCertificate{
SecretRef: to.Ptr("example-secret"),
},
},
},
},
},
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.BrokerListenerClientCreateOrUpdateResponse{
// BrokerListenerResource: &armiotoperations.BrokerListenerResource{
// Properties: &armiotoperations.BrokerListenerProperties{
// ServiceName: to.Ptr("tpfiszlapdpxktx"),
// ServiceType: to.Ptr(armiotoperations.ServiceTypeLoadBalancer),
// Ports: []*armiotoperations.ListenerPort{
// {
// Port: to.Ptr[int32](8080),
// AuthenticationRef: to.Ptr("example-authentication"),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
// },
// {
// Port: to.Ptr[int32](8443),
// AuthenticationRef: to.Ptr("example-authentication"),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
// TLS: &armiotoperations.TLSCertMethod{
// Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic),
// CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{
// IssuerRef: &armiotoperations.CertManagerIssuerRef{
// Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"),
// Name: to.Ptr("example-issuer"),
// Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer),
// },
// },
// },
// },
// {
// Port: to.Ptr[int32](1883),
// AuthenticationRef: to.Ptr("example-authentication"),
// },
// {
// Port: to.Ptr[int32](8883),
// AuthenticationRef: to.Ptr("example-authentication"),
// TLS: &armiotoperations.TLSCertMethod{
// Mode: to.Ptr(armiotoperations.TLSCertMethodModeManual),
// Manual: &armiotoperations.X509ManualCertificate{
// SecretRef: to.Ptr("example-secret"),
// },
// },
// },
// },
// 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/brokers/resource-name123/listeners/resource-name123"),
// Name: to.Ptr("hoqjaachratt"),
// Type: to.Ptr("hizbknwegcdaeh"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,141 @@
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/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json
func ExampleBrokerListenerClient_BeginCreateOrUpdate_brokerListenerCreateOrUpdate() {
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.NewBrokerListenerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerListenerResource{
Properties: &armiotoperations.BrokerListenerProperties{
ServiceName: to.Ptr("tpfiszlapdpxktx"),
Ports: []*armiotoperations.ListenerPort{
{
AuthenticationRef: to.Ptr("tjvdroaqqy"),
AuthorizationRef: to.Ptr("inxhvxnwswyrvt"),
NodePort: to.Ptr[int32](7281),
Port: to.Ptr[int32](1268),
Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
TLS: &armiotoperations.TLSCertMethod{
Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic),
CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{
Duration: to.Ptr("qmpeffoksron"),
SecretName: to.Ptr("oagi"),
RenewBefore: to.Ptr("hutno"),
IssuerRef: &armiotoperations.CertManagerIssuerRef{
Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"),
Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer),
Name: to.Ptr("ocwoqpgucvjrsuudtjhb"),
},
PrivateKey: &armiotoperations.CertManagerPrivateKey{
Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
},
San: &armiotoperations.SanForCert{
DNS: []*string{
to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"),
},
IP: []*string{
to.Ptr("zbgugfzcgsmegevzktsnibyuyp"),
},
},
},
Manual: &armiotoperations.X509ManualCertificate{
SecretRef: to.Ptr("secret-name"),
},
},
},
},
ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP),
},
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.BrokerListenerClientCreateOrUpdateResponse{
// BrokerListenerResource: &armiotoperations.BrokerListenerResource{
// Properties: &armiotoperations.BrokerListenerProperties{
// ServiceName: to.Ptr("tpfiszlapdpxktx"),
// Ports: []*armiotoperations.ListenerPort{
// {
// AuthenticationRef: to.Ptr("tjvdroaqqy"),
// AuthorizationRef: to.Ptr("inxhvxnwswyrvt"),
// NodePort: to.Ptr[int32](7281),
// Port: to.Ptr[int32](1268),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
// TLS: &armiotoperations.TLSCertMethod{
// Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic),
// CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{
// Duration: to.Ptr("qmpeffoksron"),
// SecretName: to.Ptr("oagi"),
// RenewBefore: to.Ptr("hutno"),
// IssuerRef: &armiotoperations.CertManagerIssuerRef{
// Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"),
// Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer),
// Name: to.Ptr("ocwoqpgucvjrsuudtjhb"),
// },
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// San: &armiotoperations.SanForCert{
// DNS: []*string{
// to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"),
// },
// IP: []*string{
// to.Ptr("zbgugfzcgsmegevzktsnibyuyp"),
// },
// },
// },
// Manual: &armiotoperations.X509ManualCertificate{
// SecretRef: to.Ptr("secret-name"),
// },
// },
// },
// },
// ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP),
// 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/brokers/resource-name123/listeners/resource-name123"),
// Name: to.Ptr("hoqjaachratt"),
// Type: to.Ptr("hizbknwegcdaeh"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,75 @@
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/BrokerListener_CreateOrUpdate_Simple.json
func ExampleBrokerListenerClient_BeginCreateOrUpdate_brokerListenerCreateOrUpdateSimple() {
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.NewBrokerListenerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.BrokerListenerResource{
Properties: &armiotoperations.BrokerListenerProperties{
Ports: []*armiotoperations.ListenerPort{
{
Port: to.Ptr[int32](1883),
},
},
},
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.BrokerListenerClientCreateOrUpdateResponse{
// BrokerListenerResource: &armiotoperations.BrokerListenerResource{
// Properties: &armiotoperations.BrokerListenerProperties{
// ServiceName: to.Ptr("tpfiszlapdpxktx"),
// ServiceType: to.Ptr(armiotoperations.ServiceTypeLoadBalancer),
// Ports: []*armiotoperations.ListenerPort{
// {
// Port: to.Ptr[int32](1883),
// },
// },
// 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/brokers/resource-name123/listeners/resource-name123"),
// Name: to.Ptr("hoqjaachratt"),
// Type: to.Ptr("hizbknwegcdaeh"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,30 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerListener_Delete_MaximumSet_Gen.json
func ExampleBrokerListenerClient_BeginDelete() {
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.NewBrokerListenerClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,90 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerListener_Get_MaximumSet_Gen.json
func ExampleBrokerListenerClient_Get() {
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)
}
res, err := clientFactory.NewBrokerListenerClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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.BrokerListenerClientGetResponse{
// BrokerListenerResource: &armiotoperations.BrokerListenerResource{
// Properties: &armiotoperations.BrokerListenerProperties{
// ServiceName: to.Ptr("tpfiszlapdpxktx"),
// Ports: []*armiotoperations.ListenerPort{
// {
// AuthenticationRef: to.Ptr("tjvdroaqqy"),
// AuthorizationRef: to.Ptr("inxhvxnwswyrvt"),
// NodePort: to.Ptr[int32](7281),
// Port: to.Ptr[int32](1268),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
// TLS: &armiotoperations.TLSCertMethod{
// Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic),
// CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{
// Duration: to.Ptr("qmpeffoksron"),
// SecretName: to.Ptr("oagi"),
// RenewBefore: to.Ptr("hutno"),
// IssuerRef: &armiotoperations.CertManagerIssuerRef{
// Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"),
// Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer),
// Name: to.Ptr("ocwoqpgucvjrsuudtjhb"),
// },
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// San: &armiotoperations.SanForCert{
// DNS: []*string{
// to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"),
// },
// IP: []*string{
// to.Ptr("zbgugfzcgsmegevzktsnibyuyp"),
// },
// },
// },
// Manual: &armiotoperations.X509ManualCertificate{
// SecretRef: to.Ptr("secret-name"),
// },
// },
// },
// },
// ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP),
// 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/brokers/resource-name123/listeners/resource-name123"),
// Name: to.Ptr("hoqjaachratt"),
// Type: to.Ptr("hizbknwegcdaeh"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,100 @@
package armiotoperations_test
import (
"context"
"log"
"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/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json
func ExampleBrokerListenerClient_NewListByResourceGroupPager() {
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)
}
pager := clientFactory.NewBrokerListenerClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", "resource-name123", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armiotoperations.BrokerListenerClientListByResourceGroupResponse{
// BrokerListenerResourceListResult: armiotoperations.BrokerListenerResourceListResult{
// Value: []*armiotoperations.BrokerListenerResource{
// {
// Properties: &armiotoperations.BrokerListenerProperties{
// ServiceName: to.Ptr("tpfiszlapdpxktx"),
// Ports: []*armiotoperations.ListenerPort{
// {
// AuthenticationRef: to.Ptr("tjvdroaqqy"),
// AuthorizationRef: to.Ptr("inxhvxnwswyrvt"),
// NodePort: to.Ptr[int32](7281),
// Port: to.Ptr[int32](1268),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
// TLS: &armiotoperations.TLSCertMethod{
// Mode: to.Ptr(armiotoperations.TLSCertMethodModeAutomatic),
// CertManagerCertificateSpec: &armiotoperations.CertManagerCertificateSpec{
// Duration: to.Ptr("qmpeffoksron"),
// SecretName: to.Ptr("oagi"),
// RenewBefore: to.Ptr("hutno"),
// IssuerRef: &armiotoperations.CertManagerIssuerRef{
// Group: to.Ptr("jtmuladdkpasfpoyvewekmiy"),
// Kind: to.Ptr(armiotoperations.CertManagerIssuerKindIssuer),
// Name: to.Ptr("ocwoqpgucvjrsuudtjhb"),
// },
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// San: &armiotoperations.SanForCert{
// DNS: []*string{
// to.Ptr("xhvmhrrhgfsapocjeebqtnzarlj"),
// },
// IP: []*string{
// to.Ptr("zbgugfzcgsmegevzktsnibyuyp"),
// },
// },
// },
// Manual: &armiotoperations.X509ManualCertificate{
// SecretRef: to.Ptr("secret-name"),
// },
// },
// },
// },
// ServiceType: to.Ptr(armiotoperations.ServiceTypeClusterIP),
// 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/brokers/resource-name123/listeners/resource-name123"),
// Name: to.Ptr("hoqjaachratt"),
// Type: to.Ptr("hizbknwegcdaeh"),
// 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}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,99 @@
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/Broker_CreateOrUpdate_Complex.json
func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdateComplex() {
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.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{
Properties: &armiotoperations.BrokerProperties{
Cardinality: &armiotoperations.Cardinality{
BackendChain: &armiotoperations.BackendChain{
Partitions: to.Ptr[int32](2),
RedundancyFactor: to.Ptr[int32](2),
Workers: to.Ptr[int32](2),
},
Frontend: &armiotoperations.Frontend{
Replicas: to.Ptr[int32](2),
Workers: to.Ptr[int32](2),
},
},
DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
MaxSize: to.Ptr("50M"),
},
GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
},
MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileMedium),
},
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.BrokerClientCreateOrUpdateResponse{
// BrokerResource: &armiotoperations.BrokerResource{
// Properties: &armiotoperations.BrokerProperties{
// Cardinality: &armiotoperations.Cardinality{
// BackendChain: &armiotoperations.BackendChain{
// Partitions: to.Ptr[int32](2),
// RedundancyFactor: to.Ptr[int32](2),
// Workers: to.Ptr[int32](2),
// },
// Frontend: &armiotoperations.Frontend{
// Replicas: to.Ptr[int32](2),
// Workers: to.Ptr[int32](2),
// },
// },
// DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
// MaxSize: to.Ptr("50M"),
// },
// GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
// CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileMedium),
// 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/brokers/resource-name123"),
// Name: to.Ptr("llptmlifnqqwairx"),
// Type: to.Ptr("qwrfzxjfxvismlqvigot"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,351 @@
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/Broker_CreateOrUpdate_MaximumSet_Gen.json
func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdate() {
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.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{
Properties: &armiotoperations.BrokerProperties{
Advanced: &armiotoperations.AdvancedSettings{
Clients: &armiotoperations.ClientConfig{
MaxSessionExpirySeconds: to.Ptr[int32](3859),
MaxMessageExpirySeconds: to.Ptr[int32](3263),
MaxPacketSizeBytes: to.Ptr[int32](3029),
SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{
Length: to.Ptr[int64](6),
Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone),
},
MaxReceiveMaximum: to.Ptr[int32](2365),
MaxKeepAliveSeconds: to.Ptr[int32](3744),
},
EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled),
InternalCerts: &armiotoperations.CertManagerCertOptions{
Duration: to.Ptr("bchrc"),
RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"),
PrivateKey: &armiotoperations.CertManagerPrivateKey{
Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
},
},
},
Cardinality: &armiotoperations.Cardinality{
BackendChain: &armiotoperations.BackendChain{
Partitions: to.Ptr[int32](11),
RedundancyFactor: to.Ptr[int32](5),
Workers: to.Ptr[int32](15),
},
Frontend: &armiotoperations.Frontend{
Replicas: to.Ptr[int32](2),
Workers: to.Ptr[int32](6),
},
},
Diagnostics: &armiotoperations.BrokerDiagnostics{
Logs: &armiotoperations.DiagnosticsLogs{
Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
},
Metrics: &armiotoperations.Metrics{
PrometheusPort: to.Ptr[int32](7581),
},
SelfCheck: &armiotoperations.SelfCheck{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
IntervalSeconds: to.Ptr[int32](158),
TimeoutSeconds: to.Ptr[int32](14),
},
Traces: &armiotoperations.Traces{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
CacheSizeMegabytes: to.Ptr[int32](28),
SelfTracing: &armiotoperations.SelfTracing{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
IntervalSeconds: to.Ptr[int32](22),
},
SpanChannelCapacity: to.Ptr[int32](1000),
},
},
DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
MaxSize: to.Ptr("500M"),
EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
VolumeName: to.Ptr("c"),
VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
AccessModes: []*string{
to.Ptr("nuluhigrbb"),
},
DataSource: &armiotoperations.LocalKubernetesReference{
APIGroup: to.Ptr("npqapyksvvpkohujx"),
Kind: to.Ptr("wazgyb"),
Name: to.Ptr("cwhsgxxcxsyppoefm"),
},
DataSourceRef: &armiotoperations.KubernetesReference{
APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
Kind: to.Ptr("odynqzekfzsnawrctaxg"),
Name: to.Ptr("envszivbbmixbyddzg"),
Namespace: to.Ptr("etcfzvxqd"),
},
Resources: &armiotoperations.VolumeClaimResourceRequirements{
Limits: map[string]*string{
"key2719": to.Ptr("hmphcrgctu"),
},
Requests: map[string]*string{
"key2909": to.Ptr("txocprnyrsgvhfrg"),
},
},
Selector: &armiotoperations.VolumeClaimSpecSelector{
MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
{
Key: to.Ptr("e"),
Operator: to.Ptr(armiotoperations.OperatorValuesIn),
Values: []*string{
to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
},
},
},
MatchLabels: map[string]*string{
"key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
},
},
},
PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
VolumeName: to.Ptr("c"),
VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
AccessModes: []*string{
to.Ptr("nuluhigrbb"),
},
DataSource: &armiotoperations.LocalKubernetesReference{
APIGroup: to.Ptr("npqapyksvvpkohujx"),
Kind: to.Ptr("wazgyb"),
Name: to.Ptr("cwhsgxxcxsyppoefm"),
},
DataSourceRef: &armiotoperations.KubernetesReference{
APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
Kind: to.Ptr("odynqzekfzsnawrctaxg"),
Name: to.Ptr("envszivbbmixbyddzg"),
Namespace: to.Ptr("etcfzvxqd"),
},
Resources: &armiotoperations.VolumeClaimResourceRequirements{
Limits: map[string]*string{
"key2719": to.Ptr("hmphcrgctu"),
},
Requests: map[string]*string{
"key2909": to.Ptr("txocprnyrsgvhfrg"),
},
},
Selector: &armiotoperations.VolumeClaimSpecSelector{
MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
{
Key: to.Ptr("e"),
Operator: to.Ptr(armiotoperations.OperatorValuesIn),
Values: []*string{
to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
},
},
},
MatchLabels: map[string]*string{
"key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
},
},
},
},
GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
},
MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny),
},
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.BrokerClientCreateOrUpdateResponse{
// BrokerResource: &armiotoperations.BrokerResource{
// Properties: &armiotoperations.BrokerProperties{
// Advanced: &armiotoperations.AdvancedSettings{
// Clients: &armiotoperations.ClientConfig{
// MaxSessionExpirySeconds: to.Ptr[int32](3859),
// MaxMessageExpirySeconds: to.Ptr[int32](3263),
// MaxPacketSizeBytes: to.Ptr[int32](3029),
// SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{
// Length: to.Ptr[int64](6),
// Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone),
// },
// MaxReceiveMaximum: to.Ptr[int32](2365),
// MaxKeepAliveSeconds: to.Ptr[int32](3744),
// },
// EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled),
// InternalCerts: &armiotoperations.CertManagerCertOptions{
// Duration: to.Ptr("bchrc"),
// RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"),
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// },
// },
// Cardinality: &armiotoperations.Cardinality{
// BackendChain: &armiotoperations.BackendChain{
// Partitions: to.Ptr[int32](11),
// RedundancyFactor: to.Ptr[int32](5),
// Workers: to.Ptr[int32](15),
// },
// Frontend: &armiotoperations.Frontend{
// Replicas: to.Ptr[int32](2),
// Workers: to.Ptr[int32](6),
// },
// },
// Diagnostics: &armiotoperations.BrokerDiagnostics{
// Logs: &armiotoperations.DiagnosticsLogs{
// Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
// },
// Metrics: &armiotoperations.Metrics{
// PrometheusPort: to.Ptr[int32](7581),
// },
// SelfCheck: &armiotoperations.SelfCheck{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](158),
// TimeoutSeconds: to.Ptr[int32](14),
// },
// Traces: &armiotoperations.Traces{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// CacheSizeMegabytes: to.Ptr[int32](28),
// SelfTracing: &armiotoperations.SelfTracing{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](22),
// },
// SpanChannelCapacity: to.Ptr[int32](1000),
// },
// },
// DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
// MaxSize: to.Ptr("500M"),
// EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// },
// GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
// CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny),
// 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/brokers/resource-name123"),
// Name: to.Ptr("dowrkel"),
// Type: to.Ptr("xshjnsdgadygb"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,208 @@
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/Broker_CreateOrUpdate_Minimal.json
func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdateMinimal() {
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.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{
Properties: &armiotoperations.BrokerProperties{
MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny),
},
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.BrokerClientCreateOrUpdateResponse{
// BrokerResource: &armiotoperations.BrokerResource{
// Properties: &armiotoperations.BrokerProperties{
// Advanced: &armiotoperations.AdvancedSettings{
// Clients: &armiotoperations.ClientConfig{
// MaxSessionExpirySeconds: to.Ptr[int32](3859),
// MaxMessageExpirySeconds: to.Ptr[int32](3263),
// MaxPacketSizeBytes: to.Ptr[int32](3029),
// SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{
// Length: to.Ptr[int64](6),
// Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone),
// },
// MaxReceiveMaximum: to.Ptr[int32](2365),
// MaxKeepAliveSeconds: to.Ptr[int32](3744),
// },
// EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled),
// InternalCerts: &armiotoperations.CertManagerCertOptions{
// Duration: to.Ptr("bchrc"),
// RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"),
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// },
// },
// Cardinality: &armiotoperations.Cardinality{
// BackendChain: &armiotoperations.BackendChain{
// Partitions: to.Ptr[int32](11),
// RedundancyFactor: to.Ptr[int32](5),
// Workers: to.Ptr[int32](15),
// },
// Frontend: &armiotoperations.Frontend{
// Replicas: to.Ptr[int32](2),
// Workers: to.Ptr[int32](6),
// },
// },
// Diagnostics: &armiotoperations.BrokerDiagnostics{
// Logs: &armiotoperations.DiagnosticsLogs{
// Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
// },
// Metrics: &armiotoperations.Metrics{
// PrometheusPort: to.Ptr[int32](7581),
// },
// SelfCheck: &armiotoperations.SelfCheck{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](158),
// TimeoutSeconds: to.Ptr[int32](14),
// },
// Traces: &armiotoperations.Traces{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// CacheSizeMegabytes: to.Ptr[int32](28),
// SelfTracing: &armiotoperations.SelfTracing{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](22),
// },
// SpanChannelCapacity: to.Ptr[int32](1000),
// },
// },
// DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
// MaxSize: to.Ptr("500M"),
// EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// },
// GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
// CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny),
// 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/brokers/resource-name123"),
// Name: to.Ptr("dowrkel"),
// Type: to.Ptr("xshjnsdgadygb"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,222 @@
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/Broker_CreateOrUpdate_Simple.json
func ExampleBrokerClient_BeginCreateOrUpdate_brokerCreateOrUpdateSimple() {
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.NewBrokerClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.BrokerResource{
Properties: &armiotoperations.BrokerProperties{
Cardinality: &armiotoperations.Cardinality{
BackendChain: &armiotoperations.BackendChain{
Partitions: to.Ptr[int32](2),
RedundancyFactor: to.Ptr[int32](2),
Workers: to.Ptr[int32](2),
},
Frontend: &armiotoperations.Frontend{
Replicas: to.Ptr[int32](2),
Workers: to.Ptr[int32](2),
},
},
GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
},
MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileLow),
},
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.BrokerClientCreateOrUpdateResponse{
// BrokerResource: &armiotoperations.BrokerResource{
// Properties: &armiotoperations.BrokerProperties{
// Advanced: &armiotoperations.AdvancedSettings{
// Clients: &armiotoperations.ClientConfig{
// MaxSessionExpirySeconds: to.Ptr[int32](3859),
// MaxMessageExpirySeconds: to.Ptr[int32](3263),
// MaxPacketSizeBytes: to.Ptr[int32](3029),
// SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{
// Length: to.Ptr[int64](6),
// Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone),
// },
// MaxReceiveMaximum: to.Ptr[int32](2365),
// MaxKeepAliveSeconds: to.Ptr[int32](3744),
// },
// EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled),
// InternalCerts: &armiotoperations.CertManagerCertOptions{
// Duration: to.Ptr("bchrc"),
// RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"),
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// },
// },
// Cardinality: &armiotoperations.Cardinality{
// BackendChain: &armiotoperations.BackendChain{
// Partitions: to.Ptr[int32](11),
// RedundancyFactor: to.Ptr[int32](5),
// Workers: to.Ptr[int32](15),
// },
// Frontend: &armiotoperations.Frontend{
// Replicas: to.Ptr[int32](2),
// Workers: to.Ptr[int32](6),
// },
// },
// Diagnostics: &armiotoperations.BrokerDiagnostics{
// Logs: &armiotoperations.DiagnosticsLogs{
// Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
// },
// Metrics: &armiotoperations.Metrics{
// PrometheusPort: to.Ptr[int32](7581),
// },
// SelfCheck: &armiotoperations.SelfCheck{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](158),
// TimeoutSeconds: to.Ptr[int32](14),
// },
// Traces: &armiotoperations.Traces{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// CacheSizeMegabytes: to.Ptr[int32](28),
// SelfTracing: &armiotoperations.SelfTracing{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](22),
// },
// SpanChannelCapacity: to.Ptr[int32](1000),
// },
// },
// DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
// MaxSize: to.Ptr("500M"),
// EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// },
// GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
// CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny),
// 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/brokers/resource-name123"),
// Name: to.Ptr("dowrkel"),
// Type: to.Ptr("xshjnsdgadygb"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,30 @@
package armiotoperations_test
import (
"context"
"log"
"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/Broker_Delete_MaximumSet_Gen.json
func ExampleBrokerClient_BeginDelete() {
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.NewBrokerClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,195 @@
package armiotoperations_test
import (
"context"
"log"
"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/Broker_Get_MaximumSet_Gen.json
func ExampleBrokerClient_Get() {
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)
}
res, err := clientFactory.NewBrokerClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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.BrokerClientGetResponse{
// BrokerResource: &armiotoperations.BrokerResource{
// Properties: &armiotoperations.BrokerProperties{
// Advanced: &armiotoperations.AdvancedSettings{
// Clients: &armiotoperations.ClientConfig{
// MaxSessionExpirySeconds: to.Ptr[int32](3859),
// MaxMessageExpirySeconds: to.Ptr[int32](3263),
// MaxPacketSizeBytes: to.Ptr[int32](3029),
// SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{
// Length: to.Ptr[int64](6),
// Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone),
// },
// MaxReceiveMaximum: to.Ptr[int32](2365),
// MaxKeepAliveSeconds: to.Ptr[int32](3744),
// },
// EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled),
// InternalCerts: &armiotoperations.CertManagerCertOptions{
// Duration: to.Ptr("bchrc"),
// RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"),
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// },
// },
// Cardinality: &armiotoperations.Cardinality{
// BackendChain: &armiotoperations.BackendChain{
// Partitions: to.Ptr[int32](11),
// RedundancyFactor: to.Ptr[int32](5),
// Workers: to.Ptr[int32](15),
// },
// Frontend: &armiotoperations.Frontend{
// Replicas: to.Ptr[int32](2),
// Workers: to.Ptr[int32](6),
// },
// },
// Diagnostics: &armiotoperations.BrokerDiagnostics{
// Logs: &armiotoperations.DiagnosticsLogs{
// Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
// },
// Metrics: &armiotoperations.Metrics{
// PrometheusPort: to.Ptr[int32](7581),
// },
// SelfCheck: &armiotoperations.SelfCheck{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](158),
// TimeoutSeconds: to.Ptr[int32](14),
// },
// Traces: &armiotoperations.Traces{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// CacheSizeMegabytes: to.Ptr[int32](28),
// SelfTracing: &armiotoperations.SelfTracing{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](22),
// },
// SpanChannelCapacity: to.Ptr[int32](1000),
// },
// },
// DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
// MaxSize: to.Ptr("500M"),
// EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// },
// GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
// CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny),
// 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/brokers/resource-name123"),
// Name: to.Ptr("dowrkel"),
// Type: to.Ptr("xshjnsdgadygb"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,205 @@
package armiotoperations_test
import (
"context"
"log"
"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/Broker_ListByResourceGroup_MaximumSet_Gen.json
func ExampleBrokerClient_NewListByResourceGroupPager() {
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)
}
pager := clientFactory.NewBrokerClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armiotoperations.BrokerClientListByResourceGroupResponse{
// BrokerResourceListResult: armiotoperations.BrokerResourceListResult{
// Value: []*armiotoperations.BrokerResource{
// {
// Properties: &armiotoperations.BrokerProperties{
// Advanced: &armiotoperations.AdvancedSettings{
// Clients: &armiotoperations.ClientConfig{
// MaxSessionExpirySeconds: to.Ptr[int32](3859),
// MaxMessageExpirySeconds: to.Ptr[int32](3263),
// MaxPacketSizeBytes: to.Ptr[int32](3029),
// SubscriberQueueLimit: &armiotoperations.SubscriberQueueLimit{
// Length: to.Ptr[int64](6),
// Strategy: to.Ptr(armiotoperations.SubscriberMessageDropStrategyNone),
// },
// MaxReceiveMaximum: to.Ptr[int32](2365),
// MaxKeepAliveSeconds: to.Ptr[int32](3744),
// },
// EncryptInternalTraffic: to.Ptr(armiotoperations.OperationalModeEnabled),
// InternalCerts: &armiotoperations.CertManagerCertOptions{
// Duration: to.Ptr("bchrc"),
// RenewBefore: to.Ptr("xkafmpgjfifkwwrhkswtopdnne"),
// PrivateKey: &armiotoperations.CertManagerPrivateKey{
// Algorithm: to.Ptr(armiotoperations.PrivateKeyAlgorithmEc256),
// RotationPolicy: to.Ptr(armiotoperations.PrivateKeyRotationPolicyAlways),
// },
// },
// },
// Cardinality: &armiotoperations.Cardinality{
// BackendChain: &armiotoperations.BackendChain{
// Partitions: to.Ptr[int32](11),
// RedundancyFactor: to.Ptr[int32](5),
// Workers: to.Ptr[int32](15),
// },
// Frontend: &armiotoperations.Frontend{
// Replicas: to.Ptr[int32](2),
// Workers: to.Ptr[int32](6),
// },
// },
// Diagnostics: &armiotoperations.BrokerDiagnostics{
// Logs: &armiotoperations.DiagnosticsLogs{
// Level: to.Ptr("rnmwokumdmebpmfxxxzvvjfdywotav"),
// },
// Metrics: &armiotoperations.Metrics{
// PrometheusPort: to.Ptr[int32](7581),
// },
// SelfCheck: &armiotoperations.SelfCheck{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](158),
// TimeoutSeconds: to.Ptr[int32](14),
// },
// Traces: &armiotoperations.Traces{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// CacheSizeMegabytes: to.Ptr[int32](28),
// SelfTracing: &armiotoperations.SelfTracing{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// IntervalSeconds: to.Ptr[int32](22),
// },
// SpanChannelCapacity: to.Ptr[int32](1000),
// },
// },
// DiskBackedMessageBuffer: &armiotoperations.DiskBackedMessageBuffer{
// MaxSize: to.Ptr("500M"),
// EphemeralVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// PersistentVolumeClaimSpec: &armiotoperations.VolumeClaimSpec{
// VolumeName: to.Ptr("c"),
// VolumeMode: to.Ptr("rxvpksjuuugqnqzeiprocknbn"),
// StorageClassName: to.Ptr("sseyhrjptkhrqvpdpjmornkqvon"),
// AccessModes: []*string{
// to.Ptr("nuluhigrbb"),
// },
// DataSource: &armiotoperations.LocalKubernetesReference{
// APIGroup: to.Ptr("npqapyksvvpkohujx"),
// Kind: to.Ptr("wazgyb"),
// Name: to.Ptr("cwhsgxxcxsyppoefm"),
// },
// DataSourceRef: &armiotoperations.KubernetesReference{
// APIGroup: to.Ptr("mnfnykznjjsoqpfsgdqioupt"),
// Kind: to.Ptr("odynqzekfzsnawrctaxg"),
// Name: to.Ptr("envszivbbmixbyddzg"),
// Namespace: to.Ptr("etcfzvxqd"),
// },
// Resources: &armiotoperations.VolumeClaimResourceRequirements{
// Limits: map[string]*string{
// "key2719": to.Ptr("hmphcrgctu"),
// },
// Requests: map[string]*string{
// "key2909": to.Ptr("txocprnyrsgvhfrg"),
// },
// },
// Selector: &armiotoperations.VolumeClaimSpecSelector{
// MatchExpressions: []*armiotoperations.VolumeClaimSpecSelectorMatchExpressions{
// {
// Key: to.Ptr("e"),
// Operator: to.Ptr(armiotoperations.OperatorValuesIn),
// Values: []*string{
// to.Ptr("slmpajlywqvuyknipgztsonqyybt"),
// },
// },
// },
// MatchLabels: map[string]*string{
// "key6673": to.Ptr("wlngfalznwxnurzpgxomcxhbqefpr"),
// },
// },
// },
// },
// GenerateResourceLimits: &armiotoperations.GenerateResourceLimits{
// CPU: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// MemoryProfile: to.Ptr(armiotoperations.BrokerMemoryProfileTiny),
// 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/brokers/resource-name123"),
// Name: to.Ptr("dowrkel"),
// Type: to.Ptr("xshjnsdgadygb"),
// 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}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,83 @@
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/DataflowEndpoint_CreateOrUpdate_ADLSv2.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAdlsv2() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "adlsv2-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeDataLakeStorage),
DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
Host: to.Ptr("example.blob.core.windows.net"),
Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodAccessToken),
AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
SecretRef: to.Ptr("my-secret"),
},
},
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeDataLakeStorage),
// DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
// Host: to.Ptr("example.blob.core.windows.net"),
// Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
// Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodAccessToken),
// AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
// SecretRef: to.Ptr("my-secret"),
// },
// },
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,90 @@
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/DataflowEndpoint_CreateOrUpdate_ADX.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAdx() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "adx-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
Host: to.Ptr("example.westeurope.kusto.windows.net"),
Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
},
Database: to.Ptr("example-database"),
Batching: &armiotoperations.BatchingConfiguration{
LatencySeconds: to.Ptr[int32](9312),
MaxMessages: to.Ptr[int32](9028),
},
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
// DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
// Host: to.Ptr("example.westeurope.kusto.windows.net"),
// Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
// Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// },
// },
// Database: to.Ptr("example-database"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](9312),
// MaxMessages: to.Ptr[int32](9028),
// },
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,89 @@
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/DataflowEndpoint_CreateOrUpdate_AIO.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateAio() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "aio-builtin-broker-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
MqttSettings: &armiotoperations.DataflowEndpointMqtt{
Host: to.Ptr("aio-broker:18883"),
Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
Audience: to.Ptr("aio-internal"),
},
},
TLS: &armiotoperations.TLSProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
TrustedCaCertificateConfigMapRef: to.Ptr("aio-ca-trust-bundle-test-only"),
},
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
// MqttSettings: &armiotoperations.DataflowEndpointMqtt{
// Host: to.Ptr("aio-broker:18883"),
// Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
// ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
// Audience: to.Ptr("aio-internal"),
// },
// },
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("aio-ca-trust-bundle-test-only"),
// },
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,86 @@
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/DataflowEndpoint_CreateOrUpdate_EventGrid.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateEventGrid() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "event-grid-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
MqttSettings: &armiotoperations.DataflowEndpointMqtt{
Host: to.Ptr("example.westeurope-1.ts.eventgrid.azure.net:8883"),
Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
},
TLS: &armiotoperations.TLSProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
},
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
// MqttSettings: &armiotoperations.DataflowEndpointMqtt{
// Host: to.Ptr("example.westeurope-1.ts.eventgrid.azure.net:8883"),
// Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
// Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// },
// },
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,88 @@
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/DataflowEndpoint_CreateOrUpdate_EventHub.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateEventHub() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "event-hub-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
KafkaSettings: &armiotoperations.DataflowEndpointKafka{
Host: to.Ptr("example.servicebus.windows.net:9093"),
Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
},
TLS: &armiotoperations.TLSProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
},
ConsumerGroupID: to.Ptr("aiodataflows"),
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
// KafkaSettings: &armiotoperations.DataflowEndpointKafka{
// Host: to.Ptr("example.servicebus.windows.net:9093"),
// Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
// Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// },
// },
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// },
// ConsumerGroupID: to.Ptr("aiodataflows"),
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,90 @@
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/DataflowEndpoint_CreateOrUpdate_Fabric.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateFabric() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "fabric-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeFabricOneLake),
FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
Host: to.Ptr("onelake.dfs.fabric.microsoft.com"),
Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{},
},
Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
WorkspaceName: to.Ptr("example-workspace"),
LakehouseName: to.Ptr("example-lakehouse"),
},
OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeTables),
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeFabricOneLake),
// FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
// Host: to.Ptr("onelake.dfs.fabric.microsoft.com"),
// Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
// Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// },
// },
// Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
// WorkspaceName: to.Ptr("example-workspace"),
// LakehouseName: to.Ptr("example-lakehouse"),
// },
// OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeTables),
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,117 @@
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/DataflowEndpoint_CreateOrUpdate_Kafka.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateKafka() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "generic-kafka-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
KafkaSettings: &armiotoperations.DataflowEndpointKafka{
Host: to.Ptr("example.kafka.local:9093"),
Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
Method: to.Ptr(armiotoperations.KafkaAuthMethodSasl),
SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
SecretRef: to.Ptr("my-secret"),
},
},
TLS: &armiotoperations.TLSProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
TrustedCaCertificateConfigMapRef: to.Ptr("ca-certificates"),
},
ConsumerGroupID: to.Ptr("dataflows"),
Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionGzip),
Batching: &armiotoperations.DataflowEndpointKafkaBatching{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
LatencyMs: to.Ptr[int32](5),
MaxBytes: to.Ptr[int32](1000000),
MaxMessages: to.Ptr[int32](100000),
},
PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksAll),
CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
CloudEventAttributes: to.Ptr(armiotoperations.CloudEventAttributeTypePropagate),
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeKafka),
// KafkaSettings: &armiotoperations.DataflowEndpointKafka{
// Host: to.Ptr("example.kafka.local:9093"),
// Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
// Method: to.Ptr(armiotoperations.KafkaAuthMethodSasl),
// SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
// SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
// SecretRef: to.Ptr("my-secret"),
// },
// },
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("ca-certificates"),
// },
// ConsumerGroupID: to.Ptr("dataflows"),
// Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionGzip),
// Batching: &armiotoperations.DataflowEndpointKafkaBatching{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// LatencyMs: to.Ptr[int32](5),
// MaxBytes: to.Ptr[int32](1000000),
// MaxMessages: to.Ptr[int32](100000),
// },
// PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
// KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksAll),
// CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
// CloudEventAttributes: to.Ptr(armiotoperations.CloudEventAttributeTypePropagate),
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,71 @@
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/DataflowEndpoint_CreateOrUpdate_LocalStorage.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateLocalStorage() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "local-storage-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeLocalStorage),
LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
PersistentVolumeClaimRef: to.Ptr("example-pvc"),
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeLocalStorage),
// LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
// PersistentVolumeClaimRef: to.Ptr("example-pvc"),
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,103 @@
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/DataflowEndpoint_CreateOrUpdate_MQTT.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdateMqtt() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "generic-mqtt-broker-endpoint", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
MqttSettings: &armiotoperations.DataflowEndpointMqtt{
Host: to.Ptr("example.broker.local:1883"),
Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
Method: to.Ptr(armiotoperations.MqttAuthMethodX509Certificate),
X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
SecretRef: to.Ptr("example-secret"),
},
},
TLS: &armiotoperations.TLSProperties{
Mode: to.Ptr(armiotoperations.OperationalModeDisabled),
},
ClientIDPrefix: to.Ptr("factory-gateway"),
Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
SessionExpirySeconds: to.Ptr[int32](3600),
Qos: to.Ptr[int32](1),
Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
MaxInflightMessages: to.Ptr[int32](100),
KeepAliveSeconds: to.Ptr[int32](60),
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeMqtt),
// MqttSettings: &armiotoperations.DataflowEndpointMqtt{
// Host: to.Ptr("example.broker.local:1883"),
// Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
// Method: to.Ptr(armiotoperations.MqttAuthMethodX509Certificate),
// X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
// SecretRef: to.Ptr("example-secret"),
// },
// },
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeDisabled),
// },
// ClientIDPrefix: to.Ptr("factory-gateway"),
// Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
// SessionExpirySeconds: to.Ptr[int32](3600),
// Qos: to.Ptr[int32](1),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeWebSockets),
// MaxInflightMessages: to.Ptr[int32](100),
// KeepAliveSeconds: to.Ptr[int32](60),
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,331 @@
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/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_BeginCreateOrUpdate_dataflowEndpointCreateOrUpdate() {
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.NewDataflowEndpointClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", armiotoperations.DataflowEndpointResource{
Properties: &armiotoperations.DataflowEndpointProperties{
EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
Audience: to.Ptr("psxomrfbhoflycm"),
},
UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
Scope: to.Ptr("zop"),
TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
},
},
Database: to.Ptr("yqcdpjsifm"),
Host: to.Ptr("<cluster>.<region>.kusto.windows.net"),
Batching: &armiotoperations.BatchingConfiguration{
LatencySeconds: to.Ptr[int32](9312),
MaxMessages: to.Ptr[int32](9028),
},
},
DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
},
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
Audience: to.Ptr("psxomrfbhoflycm"),
},
UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
Scope: to.Ptr("zop"),
TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
},
},
Host: to.Ptr("<account>.blob.core.windows.net"),
Batching: &armiotoperations.BatchingConfiguration{
LatencySeconds: to.Ptr[int32](9312),
MaxMessages: to.Ptr[int32](9028),
},
},
FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
Audience: to.Ptr("psxomrfbhoflycm"),
},
UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
Scope: to.Ptr("zop"),
TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
},
},
Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
LakehouseName: to.Ptr("wpeathi"),
WorkspaceName: to.Ptr("nwgmitkbljztgms"),
},
OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
Host: to.Ptr("https://<host>.fabric.microsoft.com"),
Batching: &armiotoperations.BatchingConfiguration{
LatencySeconds: to.Ptr[int32](9312),
MaxMessages: to.Ptr[int32](9028),
},
},
KafkaSettings: &armiotoperations.DataflowEndpointKafka{
Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
Audience: to.Ptr("psxomrfbhoflycm"),
},
UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
Scope: to.Ptr("zop"),
TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
},
SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
},
X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
SecretRef: to.Ptr("afwizrystfslkfqd"),
},
},
ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
Batching: &armiotoperations.DataflowEndpointKafkaBatching{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
LatencyMs: to.Ptr[int32](3679),
MaxBytes: to.Ptr[int32](8887),
MaxMessages: to.Ptr[int32](2174),
},
CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
TLS: &armiotoperations.TLSProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
},
},
LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
},
MqttSettings: &armiotoperations.DataflowEndpointMqtt{
Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
Audience: to.Ptr("psxomrfbhoflycm"),
},
UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
Scope: to.Ptr("zop"),
TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
},
ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
},
X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
SecretRef: to.Ptr("afwizrystfslkfqd"),
},
},
ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
Host: to.Ptr("nyhnxqnbspstctl"),
Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
KeepAliveSeconds: to.Ptr[int32](0),
Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
MaxInflightMessages: to.Ptr[int32](0),
Qos: to.Ptr[int32](1),
SessionExpirySeconds: to.Ptr[int32](0),
TLS: &armiotoperations.TLSProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
},
},
},
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.DataflowEndpointClientCreateOrUpdateResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
// DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
// Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
// Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Database: to.Ptr("yqcdpjsifm"),
// Host: to.Ptr("<cluster>.<region>.kusto.windows.net"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
// Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
// Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
// AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
// SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
// },
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Host: to.Ptr("<account>.blob.core.windows.net"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
// Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
// Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
// LakehouseName: to.Ptr("wpeathi"),
// WorkspaceName: to.Ptr("nwgmitkbljztgms"),
// },
// OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
// Host: to.Ptr("https://<host>.fabric.microsoft.com"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// KafkaSettings: &armiotoperations.DataflowEndpointKafka{
// Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
// Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
// SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
// SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
// },
// X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
// SecretRef: to.Ptr("afwizrystfslkfqd"),
// },
// },
// ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
// Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
// Batching: &armiotoperations.DataflowEndpointKafkaBatching{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// LatencyMs: to.Ptr[int32](3679),
// MaxBytes: to.Ptr[int32](8887),
// MaxMessages: to.Ptr[int32](2174),
// },
// CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
// Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
// KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
// PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
// },
// },
// LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
// PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
// },
// MqttSettings: &armiotoperations.DataflowEndpointMqtt{
// Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
// Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
// Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
// },
// X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
// SecretRef: to.Ptr("afwizrystfslkfqd"),
// },
// },
// ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
// Host: to.Ptr("nyhnxqnbspstctl"),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
// KeepAliveSeconds: to.Ptr[int32](0),
// Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
// MaxInflightMessages: to.Ptr[int32](0),
// Qos: to.Ptr[int32](1),
// SessionExpirySeconds: to.Ptr[int32](0),
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
// },
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,30 @@
package armiotoperations_test
import (
"context"
"log"
"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/DataflowEndpoint_Delete_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_BeginDelete() {
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.NewDataflowEndpointClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,185 @@
package armiotoperations_test
import (
"context"
"log"
"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/DataflowEndpoint_Get_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_Get() {
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)
}
res, err := clientFactory.NewDataflowEndpointClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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.DataflowEndpointClientGetResponse{
// DataflowEndpointResource: &armiotoperations.DataflowEndpointResource{
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
// DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
// Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
// Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Database: to.Ptr("yqcdpjsifm"),
// Host: to.Ptr("<cluster>.<region>.kusto.windows.net"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
// Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
// Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
// AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
// SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
// },
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Host: to.Ptr("<account>.blob.core.windows.net"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
// Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
// Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
// LakehouseName: to.Ptr("wpeathi"),
// WorkspaceName: to.Ptr("nwgmitkbljztgms"),
// },
// OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
// Host: to.Ptr("https://<host>.fabric.microsoft.com"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// KafkaSettings: &armiotoperations.DataflowEndpointKafka{
// Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
// Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
// SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
// SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
// },
// X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
// SecretRef: to.Ptr("afwizrystfslkfqd"),
// },
// },
// ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
// Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
// Batching: &armiotoperations.DataflowEndpointKafkaBatching{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// LatencyMs: to.Ptr[int32](3679),
// MaxBytes: to.Ptr[int32](8887),
// MaxMessages: to.Ptr[int32](2174),
// },
// CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
// Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
// KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
// PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
// },
// },
// LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
// PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
// },
// MqttSettings: &armiotoperations.DataflowEndpointMqtt{
// Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
// Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
// Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
// },
// X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
// SecretRef: to.Ptr("afwizrystfslkfqd"),
// },
// },
// ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
// Host: to.Ptr("nyhnxqnbspstctl"),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
// KeepAliveSeconds: to.Ptr[int32](0),
// Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
// MaxInflightMessages: to.Ptr[int32](0),
// Qos: to.Ptr[int32](1),
// SessionExpirySeconds: to.Ptr[int32](0),
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
// },
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,195 @@
package armiotoperations_test
import (
"context"
"log"
"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/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json
func ExampleDataflowEndpointClient_NewListByResourceGroupPager() {
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)
}
pager := clientFactory.NewDataflowEndpointClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armiotoperations.DataflowEndpointClientListByResourceGroupResponse{
// DataflowEndpointResourceListResult: armiotoperations.DataflowEndpointResourceListResult{
// Value: []*armiotoperations.DataflowEndpointResource{
// {
// Properties: &armiotoperations.DataflowEndpointProperties{
// EndpointType: to.Ptr(armiotoperations.EndpointTypeDataExplorer),
// DataExplorerSettings: &armiotoperations.DataflowEndpointDataExplorer{
// Authentication: &armiotoperations.DataflowEndpointDataExplorerAuthentication{
// Method: to.Ptr(armiotoperations.DataExplorerAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Database: to.Ptr("yqcdpjsifm"),
// Host: to.Ptr("<cluster>.<region>.kusto.windows.net"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// DataLakeStorageSettings: &armiotoperations.DataflowEndpointDataLakeStorage{
// Authentication: &armiotoperations.DataflowEndpointDataLakeStorageAuthentication{
// Method: to.Ptr(armiotoperations.DataLakeStorageAuthMethodSystemAssignedManagedIdentity),
// AccessTokenSettings: &armiotoperations.DataflowEndpointAuthenticationAccessToken{
// SecretRef: to.Ptr("sevriyphcvnlrnfudqzejecwa"),
// },
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Host: to.Ptr("<account>.blob.core.windows.net"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// FabricOneLakeSettings: &armiotoperations.DataflowEndpointFabricOneLake{
// Authentication: &armiotoperations.DataflowEndpointFabricOneLakeAuthentication{
// Method: to.Ptr(armiotoperations.FabricOneLakeAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// },
// Names: &armiotoperations.DataflowEndpointFabricOneLakeNames{
// LakehouseName: to.Ptr("wpeathi"),
// WorkspaceName: to.Ptr("nwgmitkbljztgms"),
// },
// OneLakePathType: to.Ptr(armiotoperations.DataflowEndpointFabricPathTypeFiles),
// Host: to.Ptr("https://<host>.fabric.microsoft.com"),
// Batching: &armiotoperations.BatchingConfiguration{
// LatencySeconds: to.Ptr[int32](1228),
// MaxMessages: to.Ptr[int32](171),
// },
// },
// KafkaSettings: &armiotoperations.DataflowEndpointKafka{
// Authentication: &armiotoperations.DataflowEndpointKafkaAuthentication{
// Method: to.Ptr(armiotoperations.KafkaAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// SaslSettings: &armiotoperations.DataflowEndpointAuthenticationSasl{
// SaslType: to.Ptr(armiotoperations.DataflowEndpointAuthenticationSaslTypePlain),
// SecretRef: to.Ptr("visyxoztqnylvbyokhtmpdkwes"),
// },
// X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
// SecretRef: to.Ptr("afwizrystfslkfqd"),
// },
// },
// ConsumerGroupID: to.Ptr("ukkzcjiyenhxokat"),
// Host: to.Ptr("pwcqfiqclcgneolpewnyavoulbip"),
// Batching: &armiotoperations.DataflowEndpointKafkaBatching{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// LatencyMs: to.Ptr[int32](3679),
// MaxBytes: to.Ptr[int32](8887),
// MaxMessages: to.Ptr[int32](2174),
// },
// CopyMqttProperties: to.Ptr(armiotoperations.OperationalModeEnabled),
// Compression: to.Ptr(armiotoperations.DataflowEndpointKafkaCompressionNone),
// KafkaAcks: to.Ptr(armiotoperations.DataflowEndpointKafkaAcksZero),
// PartitionStrategy: to.Ptr(armiotoperations.DataflowEndpointKafkaPartitionStrategyDefault),
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
// },
// },
// LocalStorageSettings: &armiotoperations.DataflowEndpointLocalStorage{
// PersistentVolumeClaimRef: to.Ptr("jjwqwvd"),
// },
// MqttSettings: &armiotoperations.DataflowEndpointMqtt{
// Authentication: &armiotoperations.DataflowEndpointMqttAuthentication{
// Method: to.Ptr(armiotoperations.MqttAuthMethodSystemAssignedManagedIdentity),
// SystemAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity{
// Audience: to.Ptr("psxomrfbhoflycm"),
// },
// UserAssignedManagedIdentitySettings: &armiotoperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity{
// ClientID: to.Ptr("fb90f267-8872-431a-a76a-a1cec5d3c4d2"),
// Scope: to.Ptr("zop"),
// TenantID: to.Ptr("ed060aa2-71ff-4d3f-99c4-a9138356fdec"),
// },
// ServiceAccountTokenSettings: &armiotoperations.DataflowEndpointAuthenticationServiceAccountToken{
// Audience: to.Ptr("ejbklrbxgjaqleoycgpje"),
// },
// X509CertificateSettings: &armiotoperations.DataflowEndpointAuthenticationX509{
// SecretRef: to.Ptr("afwizrystfslkfqd"),
// },
// },
// ClientIDPrefix: to.Ptr("kkljsdxdirfhwxtkavldekeqhv"),
// Host: to.Ptr("nyhnxqnbspstctl"),
// Protocol: to.Ptr(armiotoperations.BrokerProtocolTypeMqtt),
// KeepAliveSeconds: to.Ptr[int32](0),
// Retain: to.Ptr(armiotoperations.MqttRetainTypeKeep),
// MaxInflightMessages: to.Ptr[int32](0),
// Qos: to.Ptr[int32](1),
// SessionExpirySeconds: to.Ptr[int32](0),
// TLS: &armiotoperations.TLSProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// TrustedCaCertificateConfigMapRef: to.Ptr("tectjjvukvelsreihwadh"),
// },
// },
// 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/dataflowEndpoints/resource-name123"),
// Name: to.Ptr("zyhxscudobzfacetvgyjiav"),
// Type: to.Ptr("iay"),
// 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}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,81 @@
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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,65 @@
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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,65 @@
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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,30 @@
package armiotoperations_test
import (
"context"
"log"
"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_Delete_MaximumSet_Gen.json
func ExampleDataflowProfileClient_BeginDelete() {
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().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,60 @@
package armiotoperations_test
import (
"context"
"log"
"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_Get_MaximumSet_Gen.json
func ExampleDataflowProfileClient_Get() {
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)
}
res, err := clientFactory.NewDataflowProfileClient().Get(ctx, "rgiotoperations", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %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.DataflowProfileClientGetResponse{
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,70 @@
package armiotoperations_test
import (
"context"
"log"
"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_ListByResourceGroup_MaximumSet_Gen.json
func ExampleDataflowProfileClient_NewListByResourceGroupPager() {
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)
}
pager := clientFactory.NewDataflowProfileClient().NewListByResourceGroupPager("rgiotoperations", "resource-name123", nil)
for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
log.Fatalf("failed to advance page: %v", err)
}
for _, v := range page.Value {
// You could use page here. We use blank identifier for just demo purposes.
_ = v
}
// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// page = armiotoperations.DataflowProfileClientListByResourceGroupResponse{
// DataflowProfileResourceListResult: armiotoperations.DataflowProfileResourceListResult{
// Value: []*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}()),
// },
// },
// },
// NextLink: to.Ptr("https://microsoft.com/a"),
// },
// }
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,165 @@
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/Dataflow_CreateOrUpdate_ComplexContextualization.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateComplexContextualization() {
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.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-adx-contexualized", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
Name: to.Ptr("transformation1"),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Inputs: []*string{
to.Ptr("*"),
},
Output: to.Ptr("*"),
},
{
Inputs: []*string{
to.Ptr("$context(quality).*"),
},
Output: to.Ptr("enriched.*"),
},
},
Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
{
Key: to.Ptr("quality"),
Inputs: []*string{
to.Ptr("$source.country"),
to.Ptr("$context.country"),
},
Expression: to.Ptr("$1 == $2"),
},
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("adx-endpoint"),
DataDestination: to.Ptr("mytable"),
},
},
},
},
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.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// Name: to.Ptr("transformation1"),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Inputs: []*string{
// to.Ptr("*"),
// },
// Output: to.Ptr("*"),
// },
// {
// Inputs: []*string{
// to.Ptr("$context(quality).*"),
// },
// Output: to.Ptr("enriched.*"),
// },
// },
// Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
// {
// Key: to.Ptr("quality"),
// Inputs: []*string{
// to.Ptr("$source.country"),
// to.Ptr("$context.country"),
// },
// Expression: to.Ptr("$1 == $2"),
// },
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("adx-endpoint"),
// DataDestination: to.Ptr("mytable"),
// },
// },
// },
// 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/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,198 @@
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/Dataflow_CreateOrUpdate_ComplexEventHub.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateComplexEventHub() {
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.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-event-hub-transformed", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
{
Inputs: []*string{
to.Ptr("temperature.Value"),
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("$1 > 9000 && $2 >= 8000"),
},
},
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Inputs: []*string{
to.Ptr("*"),
},
Output: to.Ptr("*"),
},
{
Inputs: []*string{
to.Ptr("temperature.Value"),
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("($1+$2)/2"),
Output: to.Ptr("AvgTemp.Value"),
},
{
Inputs: []*string{},
Expression: to.Ptr("true"),
Output: to.Ptr("dataflow-processed"),
},
{
Inputs: []*string{
to.Ptr("temperature.SourceTimestamp"),
},
Expression: to.Ptr(""),
Output: to.Ptr(""),
},
{
Inputs: []*string{
to.Ptr("\"Tag 10\""),
},
Expression: to.Ptr(""),
Output: to.Ptr("pressure"),
},
{
Inputs: []*string{
to.Ptr("temperature.Value"),
},
Expression: to.Ptr("cToF($1)"),
Output: to.Ptr("temperatureF.Value"),
},
{
Inputs: []*string{
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("scale ($1,0,10,0,100)"),
Output: to.Ptr("\"Scale Tag 10\".Value"),
},
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("event-hub-endpoint"),
DataDestination: to.Ptr("myuniqueeventhub"),
},
},
},
},
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.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// Name: to.Ptr("transformation1"),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Inputs: []*string{
// to.Ptr("*"),
// },
// Output: to.Ptr("*"),
// },
// {
// Inputs: []*string{
// to.Ptr("$context(quality).*"),
// },
// Output: to.Ptr("enriched.*"),
// },
// },
// Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
// {
// Key: to.Ptr("quality"),
// Inputs: []*string{
// to.Ptr("$source.country"),
// to.Ptr("$context.country"),
// },
// Expression: to.Ptr("$1 == $2"),
// },
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("adx-endpoint"),
// DataDestination: to.Ptr("mytable"),
// },
// },
// },
// 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/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,157 @@
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/Dataflow_CreateOrUpdate_FilterToTopic.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateFilterToTopic() {
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.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "mqtt-filter-to-topic", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
Name: to.Ptr("transformation1"),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
{
Type: to.Ptr(armiotoperations.FilterTypeFilter),
Description: to.Ptr("filter-datapoint"),
Inputs: []*string{
to.Ptr("temperature.Value"),
to.Ptr("\"Tag 10\".Value"),
},
Expression: to.Ptr("$1 > 9000 && $2 >= 8000"),
},
},
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Type: to.Ptr(armiotoperations.DataflowMappingTypePassThrough),
Inputs: []*string{
to.Ptr("*"),
},
Output: to.Ptr("*"),
},
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataDestination: to.Ptr("data/filtered/thermostat"),
},
},
},
},
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.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// Name: to.Ptr("transformation1"),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
// {
// Type: to.Ptr(armiotoperations.FilterTypeFilter),
// Description: to.Ptr("filter-datapoint"),
// Inputs: []*string{
// to.Ptr("temperature.Value"),
// to.Ptr("\"Tag 10\".Value"),
// },
// Expression: to.Ptr("$1 > 9000 && $2 >= 8000"),
// },
// },
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Type: to.Ptr(armiotoperations.DataflowMappingTypePassThrough),
// Inputs: []*string{
// to.Ptr("*"),
// },
// Output: to.Ptr("*"),
// },
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataDestination: to.Ptr("data/filtered/thermostat"),
// },
// },
// },
// 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/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,175 @@
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/Dataflow_CreateOrUpdate_MaximumSet_Gen.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdate() {
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.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("knnafvkwoeakm"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"),
AssetRef: to.Ptr("zayyykwmckaocywdkohmu"),
SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON),
SchemaRef: to.Ptr("pknmdzqll"),
DataSources: []*string{
to.Ptr("chkkpymxhp"),
},
},
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta),
SchemaRef: to.Ptr("mcdc"),
Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
{
Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"),
Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
SchemaRef: to.Ptr("n"),
Inputs: []*string{
to.Ptr("mosffpsslifkq"),
},
Expression: to.Ptr("aatbwomvflemsxialv"),
},
},
Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
{
Type: to.Ptr(armiotoperations.FilterTypeFilter),
Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
Inputs: []*string{
to.Ptr("sxmjkbntgb"),
},
Expression: to.Ptr("n"),
},
},
Map: []*armiotoperations.DataflowBuiltInTransformationMap{
{
Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties),
Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
Inputs: []*string{
to.Ptr("xsbxuk"),
},
Expression: to.Ptr("txoiltogsarwkzalsphvlmt"),
Output: to.Ptr("nvgtmkfl"),
},
},
},
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"),
DataDestination: to.Ptr("cbrh"),
},
},
},
},
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.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("knnafvkwoeakm"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("iixotodhvhkkfcfyrkoveslqig"),
// AssetRef: to.Ptr("zayyykwmckaocywdkohmu"),
// SerializationFormat: to.Ptr(armiotoperations.SourceSerializationFormatJSON),
// SchemaRef: to.Ptr("pknmdzqll"),
// DataSources: []*string{
// to.Ptr("chkkpymxhp"),
// },
// },
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatDelta),
// SchemaRef: to.Ptr("mcdc"),
// Datasets: []*armiotoperations.DataflowBuiltInTransformationDataset{
// {
// Key: to.Ptr("qsfqcgxaxnhfumrsdsokwyv"),
// Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
// SchemaRef: to.Ptr("n"),
// Inputs: []*string{
// to.Ptr("mosffpsslifkq"),
// },
// Expression: to.Ptr("aatbwomvflemsxialv"),
// },
// },
// Filter: []*armiotoperations.DataflowBuiltInTransformationFilter{
// {
// Type: to.Ptr(armiotoperations.FilterTypeFilter),
// Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
// Inputs: []*string{
// to.Ptr("sxmjkbntgb"),
// },
// Expression: to.Ptr("n"),
// },
// },
// Map: []*armiotoperations.DataflowBuiltInTransformationMap{
// {
// Type: to.Ptr(armiotoperations.DataflowMappingTypeNewProperties),
// Description: to.Ptr("Lorem ipsum odor amet, consectetuer adipiscing elit."),
// Inputs: []*string{
// to.Ptr("xsbxuk"),
// },
// Expression: to.Ptr("txoiltogsarwkzalsphvlmt"),
// Output: to.Ptr("nvgtmkfl"),
// },
// },
// },
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("kybkchnzimerguekuvqlqiqdvvrt"),
// DataDestination: to.Ptr("cbrh"),
// },
// },
// },
// 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/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,105 @@
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/Dataflow_CreateOrUpdate_SimpleEventGrid.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateSimpleEventGrid() {
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.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-event-grid", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("thermostats/+/telemetry/temperature/#"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("event-grid-endpoint"),
DataDestination: to.Ptr("factory/telemetry"),
},
},
},
},
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.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("thermostats/+/telemetry/temperature/#"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("event-grid-endpoint"),
// DataDestination: to.Ptr("factory/telemetry"),
// },
// },
// },
// 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/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,119 @@
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/Dataflow_CreateOrUpdate_SimpleFabric.json
func ExampleDataflowClient_BeginCreateOrUpdate_dataflowCreateOrUpdateSimpleFabric() {
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.NewDataflowClient().BeginCreateOrUpdate(ctx, "rgiotoperations", "resource-name123", "resource-name123", "aio-to-fabric", armiotoperations.DataflowResource{
Properties: &armiotoperations.DataflowProperties{
Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
Operations: []*armiotoperations.DataflowOperation{
{
OperationType: to.Ptr(armiotoperations.OperationTypeSource),
Name: to.Ptr("source1"),
SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
DataSources: []*string{
to.Ptr("azure-iot-operations/data/thermostat"),
},
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatParquet),
SchemaRef: to.Ptr("aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"),
},
},
{
OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
Name: to.Ptr("destination1"),
DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
EndpointRef: to.Ptr("fabric-endpoint"),
DataDestination: to.Ptr("telemetryTable"),
},
},
},
},
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.DataflowClientCreateOrUpdateResponse{
// DataflowResource: &armiotoperations.DataflowResource{
// Properties: &armiotoperations.DataflowProperties{
// Mode: to.Ptr(armiotoperations.OperationalModeEnabled),
// Operations: []*armiotoperations.DataflowOperation{
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeSource),
// Name: to.Ptr("source1"),
// SourceSettings: &armiotoperations.DataflowSourceOperationSettings{
// EndpointRef: to.Ptr("aio-builtin-broker-endpoint"),
// DataSources: []*string{
// to.Ptr("azure-iot-operations/data/thermostat"),
// },
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeBuiltInTransformation),
// BuiltInTransformationSettings: &armiotoperations.DataflowBuiltInTransformationSettings{
// SerializationFormat: to.Ptr(armiotoperations.TransformationSerializationFormatParquet),
// SchemaRef: to.Ptr("aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0"),
// },
// },
// {
// OperationType: to.Ptr(armiotoperations.OperationTypeDestination),
// Name: to.Ptr("destination1"),
// DestinationSettings: &armiotoperations.DataflowDestinationOperationSettings{
// EndpointRef: to.Ptr("fabric-endpoint"),
// DataDestination: to.Ptr("telemetryTable"),
// },
// },
// },
// 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/dataflows/resource-name123"),
// Name: to.Ptr("jxhcpwgfkxqasbexkookvxk"),
// Type: to.Ptr("zkuozvgjseokfchkscoswthzjdry"),
// 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}()),
// },
// },
// }
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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

@ -0,0 +1,30 @@
package armiotoperations_test
import (
"context"
"log"
"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/Dataflow_Delete_MaximumSet_Gen.json
func ExampleDataflowClient_BeginDelete() {
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.NewDataflowClient().BeginDelete(ctx, "rgiotoperations", "resource-name123", "resource-name123", "resource-name123", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
}

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

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-go/blob/sdk%2Fresourcemanager%2Fiotoperations%2Farmiotoperations%2Fv0.1.0/sdk/resourcemanager/iotoperations/armiotoperations/README.md"}

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