diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_DryrunCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_DryrunCollection.cs
new file mode 100644
index 000000000000..4199812f5006
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_DryrunCollection.cs
@@ -0,0 +1,203 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Samples
+{
+ public partial class Sample_DryrunCollection
+ {
+ // ListDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ListDryrun.json
+ // this example is just showing the usage of "Linkers_ListDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ DryrunCollection collection = client.GetDryruns(scopeId);
+
+ // invoke the operation and iterate over the result
+ await foreach (DryrunResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // GetDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/GetDryrun.json
+ // this example is just showing the usage of "Linkers_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ DryrunCollection collection = client.GetDryruns(scopeId);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ DryrunResource result = await collection.GetAsync(dryrunName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // GetDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/GetDryrun.json
+ // this example is just showing the usage of "Linkers_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ DryrunCollection collection = client.GetDryruns(scopeId);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ bool result = await collection.ExistsAsync(dryrunName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // GetDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/GetDryrun.json
+ // this example is just showing the usage of "Linkers_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ DryrunCollection collection = client.GetDryruns(scopeId);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ NullableResponse response = await collection.GetIfExistsAsync(dryrunName);
+ DryrunResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // PutDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_PutDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/PutDryrun.json
+ // this example is just showing the usage of "Linkers_CreateDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ArmResource created on azure
+ // for more information of creating ArmResource, please refer to the document of ArmResource
+
+ // get the collection of this DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
+ DryrunCollection collection = client.GetDryruns(scopeId);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ DryrunResourceData data = new DryrunResourceData()
+ {
+ Parameters = new CreateOrUpdateDryrunParameters()
+ {
+ TargetService = new AzureResourceInfo()
+ {
+ Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
+ },
+ AuthInfo = new SecretAuthInfo()
+ {
+ Name = "name",
+ SecretInfo = new RawValueSecretInfo()
+ {
+ Value = "secret",
+ },
+ },
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dryrunName, data);
+ DryrunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_DryrunResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_DryrunResource.cs
new file mode 100644
index 000000000000..5a0c4a1bf1ad
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_DryrunResource.cs
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Samples
+{
+ public partial class Sample_DryrunResource
+ {
+ // GetDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/GetDryrun.json
+ // this example is just showing the usage of "Linkers_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DryrunResource created on azure
+ // for more information of creating DryrunResource, please refer to the document of DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ string dryrunName = "dryrunName";
+ ResourceIdentifier dryrunResourceId = DryrunResource.CreateResourceIdentifier(resourceUri, dryrunName);
+ DryrunResource dryrun = client.GetDryrunResource(dryrunResourceId);
+
+ // invoke the operation
+ DryrunResource result = await dryrun.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // PatchDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_PatchDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/PatchDryrun.json
+ // this example is just showing the usage of "Linkers_UpdateDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DryrunResource created on azure
+ // for more information of creating DryrunResource, please refer to the document of DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ string dryrunName = "dryrunName";
+ ResourceIdentifier dryrunResourceId = DryrunResource.CreateResourceIdentifier(resourceUri, dryrunName);
+ DryrunResource dryrun = client.GetDryrunResource(dryrunResourceId);
+
+ // invoke the operation
+ DryrunPatch patch = new DryrunPatch()
+ {
+ Parameters = new CreateOrUpdateDryrunParameters()
+ {
+ TargetService = new AzureResourceInfo()
+ {
+ Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
+ },
+ AuthInfo = new SecretAuthInfo()
+ {
+ Name = "name",
+ SecretInfo = new RawValueSecretInfo()
+ {
+ Value = "secret",
+ },
+ },
+ },
+ };
+ ArmOperation lro = await dryrun.UpdateAsync(WaitUntil.Completed, patch);
+ DryrunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // DeleteDryrun
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteDryrun()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/DeleteDryrun.json
+ // this example is just showing the usage of "Linkers_DeleteDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this DryrunResource created on azure
+ // for more information of creating DryrunResource, please refer to the document of DryrunResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
+ string dryrunName = "dryrunName";
+ ResourceIdentifier dryrunResourceId = DryrunResource.CreateResourceIdentifier(resourceUri, dryrunName);
+ DryrunResource dryrun = client.GetDryrunResource(dryrunResourceId);
+
+ // invoke the operation
+ await dryrun.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerResourceCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerCollection.cs
similarity index 58%
rename from sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerResourceCollection.cs
rename to sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerCollection.cs
index e6fc68244a46..54b815d1f552 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerResourceCollection.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerCollection.cs
@@ -13,14 +13,14 @@
namespace Azure.ResourceManager.ServiceLinker.Samples
{
- public partial class Sample_LinkerResourceCollection
+ public partial class Sample_LinkerCollection
{
- // LinkList
+ // LinkerList
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task GetAll_LinkList()
+ public async Task GetAll_LinkerList()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/LinkerList.json
// this example is just showing the usage of "Linker_List" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -34,7 +34,7 @@ public async Task GetAll_LinkList()
// get the collection of this LinkerResource
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
- LinkerResourceCollection collection = client.GetLinkerResources(scopeId);
+ LinkerCollection collection = client.GetLinkers(scopeId);
// invoke the operation and iterate over the result
await foreach (LinkerResource item in collection.GetAllAsync())
@@ -49,12 +49,12 @@ public async Task GetAll_LinkList()
Console.WriteLine($"Succeeded");
}
- // Link
+ // Linker
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task Get_Link()
+ public async Task Get_Linker()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Linker.json
// this example is just showing the usage of "Linker_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -68,7 +68,7 @@ public async Task Get_Link()
// get the collection of this LinkerResource
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
- LinkerResourceCollection collection = client.GetLinkerResources(scopeId);
+ LinkerCollection collection = client.GetLinkers(scopeId);
// invoke the operation
string linkerName = "linkName";
@@ -81,12 +81,12 @@ public async Task Get_Link()
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
- // Link
+ // Linker
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task Exists_Link()
+ public async Task Exists_Linker()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Linker.json
// this example is just showing the usage of "Linker_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -100,7 +100,7 @@ public async Task Exists_Link()
// get the collection of this LinkerResource
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
- LinkerResourceCollection collection = client.GetLinkerResources(scopeId);
+ LinkerCollection collection = client.GetLinkers(scopeId);
// invoke the operation
string linkerName = "linkName";
@@ -109,12 +109,12 @@ public async Task Exists_Link()
Console.WriteLine($"Succeeded: {result}");
}
- // Link
+ // Linker
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task GetIfExists_Link()
+ public async Task GetIfExists_Linker()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Linker.json
// this example is just showing the usage of "Linker_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -128,7 +128,7 @@ public async Task GetIfExists_Link()
// get the collection of this LinkerResource
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
- LinkerResourceCollection collection = client.GetLinkerResources(scopeId);
+ LinkerCollection collection = client.GetLinkers(scopeId);
// invoke the operation
string linkerName = "linkName";
@@ -149,12 +149,12 @@ public async Task GetIfExists_Link()
}
}
- // PutLink
+ // PutLinker
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task CreateOrUpdate_PutLink()
+ public async Task CreateOrUpdate_PutLinker()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLink.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/PutLinker.json
// this example is just showing the usage of "Linker_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -168,7 +168,7 @@ public async Task CreateOrUpdate_PutLink()
// get the collection of this LinkerResource
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
- LinkerResourceCollection collection = client.GetLinkerResources(scopeId);
+ LinkerCollection collection = client.GetLinkers(scopeId);
// invoke the operation
string linkerName = "linkName";
@@ -186,97 +186,10 @@ public async Task CreateOrUpdate_PutLink()
Value = "secret",
},
},
- };
- ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkerName, data);
- LinkerResource result = lro.Value;
-
- // the variable result is a resource, you could call other operations on this instance as well
- // but just for demo, we get its data from this resource instance
- LinkerResourceData resourceData = result.Data;
- // for demo we just print out the id
- Console.WriteLine($"Succeeded on id: {resourceData.Id}");
- }
-
- // PutLinkWithSecretStore
- [NUnit.Framework.Test]
- [NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task CreateOrUpdate_PutLinkWithSecretStore()
- {
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.json
- // this example is just showing the usage of "Linker_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
-
- // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
- TokenCredential cred = new DefaultAzureCredential();
- // authenticate your client
- ArmClient client = new ArmClient(cred);
-
- // this example assumes you already have this ArmResource created on azure
- // for more information of creating ArmResource, please refer to the document of ArmResource
-
- // get the collection of this LinkerResource
- string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
- ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
- LinkerResourceCollection collection = client.GetLinkerResources(scopeId);
-
- // invoke the operation
- string linkerName = "linkName";
- LinkerResourceData data = new LinkerResourceData()
- {
- TargetService = new AzureResourceInfo()
+ VnetSolution = new VnetSolution()
{
- Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
- },
- AuthInfo = new SecretAuthInfo(),
- SecretStoreKeyVaultId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv"),
- };
- ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkerName, data);
- LinkerResource result = lro.Value;
-
- // the variable result is a resource, you could call other operations on this instance as well
- // but just for demo, we get its data from this resource instance
- LinkerResourceData resourceData = result.Data;
- // for demo we just print out the id
- Console.WriteLine($"Succeeded on id: {resourceData.Id}");
- }
-
- // PutLinkWithServiceEndpoint
- [NUnit.Framework.Test]
- [NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task CreateOrUpdate_PutLinkWithServiceEndpoint()
- {
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithServiceEndpoint.json
- // this example is just showing the usage of "Linker_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
-
- // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
- TokenCredential cred = new DefaultAzureCredential();
- // authenticate your client
- ArmClient client = new ArmClient(cred);
-
- // this example assumes you already have this ArmResource created on azure
- // for more information of creating ArmResource, please refer to the document of ArmResource
-
- // get the collection of this LinkerResource
- string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
- ResourceIdentifier scopeId = new ResourceIdentifier(string.Format("/{0}", resourceUri));
- LinkerResourceCollection collection = client.GetLinkerResources(scopeId);
-
- // invoke the operation
- string linkerName = "linkName";
- LinkerResourceData data = new LinkerResourceData()
- {
- TargetService = new AzureResourceInfo()
- {
- Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db"),
- },
- AuthInfo = new SecretAuthInfo()
- {
- Name = "name",
- SecretInfo = new KeyVaultSecretUriSecretInfo()
- {
- Value = "https://vault-name.vault.azure.net/secrets/secret-name/00000000000000000000000000000000",
- },
+ SolutionType = VnetSolutionType.ServiceEndpoint,
},
- SolutionType = VnetSolutionType.ServiceEndpoint,
};
ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkerName, data);
LinkerResource result = lro.Value;
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerResource.cs
index 9b68c70adeb2..05b5f43ff487 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerResource.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LinkerResource.cs
@@ -15,12 +15,12 @@ namespace Azure.ResourceManager.ServiceLinker.Samples
{
public partial class Sample_LinkerResource
{
- // Link
+ // Linker
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task Get_Link()
+ public async Task Get_Linker()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Linker.json
// this example is just showing the usage of "Linker_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -33,10 +33,10 @@ public async Task Get_Link()
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
string linkerName = "linkName";
ResourceIdentifier linkerResourceId = LinkerResource.CreateResourceIdentifier(resourceUri, linkerName);
- LinkerResource linkerResource = client.GetLinkerResource(linkerResourceId);
+ LinkerResource linker = client.GetLinkerResource(linkerResourceId);
// invoke the operation
- LinkerResource result = await linkerResource.GetAsync();
+ LinkerResource result = await linker.GetAsync();
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
@@ -45,12 +45,12 @@ public async Task Get_Link()
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
- // DeleteLink
+ // DeleteLinker
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task Delete_DeleteLink()
+ public async Task Delete_DeleteLinker()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/DeleteLinker.json
// this example is just showing the usage of "Linker_Delete" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -63,20 +63,20 @@ public async Task Delete_DeleteLink()
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
string linkerName = "linkName";
ResourceIdentifier linkerResourceId = LinkerResource.CreateResourceIdentifier(resourceUri, linkerName);
- LinkerResource linkerResource = client.GetLinkerResource(linkerResourceId);
+ LinkerResource linker = client.GetLinkerResource(linkerResourceId);
// invoke the operation
- await linkerResource.DeleteAsync(WaitUntil.Completed);
+ await linker.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");
}
- // PatchLink
+ // PatchLinker
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task Update_PatchLink()
+ public async Task Update_PatchLinker()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/PatchLinker.json
// this example is just showing the usage of "Linker_Update" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -89,10 +89,10 @@ public async Task Update_PatchLink()
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
string linkerName = "linkName";
ResourceIdentifier linkerResourceId = LinkerResource.CreateResourceIdentifier(resourceUri, linkerName);
- LinkerResource linkerResource = client.GetLinkerResource(linkerResourceId);
+ LinkerResource linker = client.GetLinkerResource(linkerResourceId);
// invoke the operation
- LinkerResourcePatch patch = new LinkerResourcePatch()
+ LinkerPatch patch = new LinkerPatch()
{
TargetService = new AzureResourceInfo()
{
@@ -100,7 +100,7 @@ public async Task Update_PatchLink()
},
AuthInfo = new ServicePrincipalSecretAuthInfo("name", Guid.Parse("id"), "secret"),
};
- ArmOperation lro = await linkerResource.UpdateAsync(WaitUntil.Completed, patch);
+ ArmOperation lro = await linker.UpdateAsync(WaitUntil.Completed, patch);
LinkerResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
@@ -110,12 +110,12 @@ public async Task Update_PatchLink()
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
- // ValidateLinkSuccess
+ // ValidateLinkerSuccess
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task Validate_ValidateLinkSuccess()
+ public async Task Validate_ValidateLinkerSuccess()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ValidateLinkerSuccess.json
// this example is just showing the usage of "Linker_Validate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -128,10 +128,10 @@ public async Task Validate_ValidateLinkSuccess()
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
string linkerName = "linkName";
ResourceIdentifier linkerResourceId = LinkerResource.CreateResourceIdentifier(resourceUri, linkerName);
- LinkerResource linkerResource = client.GetLinkerResource(linkerResourceId);
+ LinkerResource linker = client.GetLinkerResource(linkerResourceId);
// invoke the operation
- ArmOperation lro = await linkerResource.ValidateAsync(WaitUntil.Completed);
+ ArmOperation lro = await linker.ValidateAsync(WaitUntil.Completed);
LinkerValidateOperationResult result = lro.Value;
Console.WriteLine($"Succeeded: {result}");
@@ -142,7 +142,7 @@ public async Task Validate_ValidateLinkSuccess()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetConfigurations_GetConfiguration()
{
- // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations.json
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/GetConfigurations.json
// this example is just showing the usage of "Linker_ListConfigurations" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
@@ -150,15 +150,48 @@ public async Task GetConfigurations_GetConfiguration()
// authenticate your client
ArmClient client = new ArmClient(cred);
+ // this example assumes you already have this LinkerResource created on azure
+ // for more information of creating LinkerResource, please refer to the document of LinkerResource
+ string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.App/containerApps/test-app";
+ string linkerName = "linkName";
+ ResourceIdentifier linkerResourceId = LinkerResource.CreateResourceIdentifier(resourceUri, linkerName);
+ LinkerResource linker = client.GetLinkerResource(linkerResourceId);
+
+ // invoke the operation
+ ConfigurationResult result = await linker.GetConfigurationsAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // GenerateConfiguration
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GenerateConfigurations_GenerateConfiguration()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/LinkerGenerateConfigurations.json
+ // this example is just showing the usage of "Linkers_GenerateConfigurations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
// this example assumes you already have this LinkerResource created on azure
// for more information of creating LinkerResource, please refer to the document of LinkerResource
string resourceUri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app";
string linkerName = "linkName";
ResourceIdentifier linkerResourceId = LinkerResource.CreateResourceIdentifier(resourceUri, linkerName);
- LinkerResource linkerResource = client.GetLinkerResource(linkerResourceId);
+ LinkerResource linker = client.GetLinkerResource(linkerResourceId);
// invoke the operation
- SourceConfigurationResult result = await linkerResource.GetConfigurationsAsync();
+ ConfigurationInfo info = new ConfigurationInfo()
+ {
+ CustomizedKeys =
+{
+["ASL_DocumentDb_ConnectionString"] = "MyConnectionstring",
+},
+ };
+ ConfigurationResult result = await linker.GenerateConfigurationsAsync(info: info);
Console.WriteLine($"Succeeded: {result}");
}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationConnectorCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationConnectorCollection.cs
new file mode 100644
index 000000000000..7a6ce80e5e53
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationConnectorCollection.cs
@@ -0,0 +1,213 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Samples
+{
+ public partial class Sample_LocationConnectorCollection
+ {
+ // ConnectorList
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ConnectorList()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorList.json
+ // this example is just showing the usage of "Connector_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationConnectorResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationConnectorCollection collection = resourceGroupResource.GetLocationConnectors(location);
+
+ // invoke the operation and iterate over the result
+ await foreach (LocationConnectorResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ LinkerResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Connector
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_Connector()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Connectors.json
+ // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationConnectorResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationConnectorCollection collection = resourceGroupResource.GetLocationConnectors(location);
+
+ // invoke the operation
+ string connectorName = "connectorName";
+ LocationConnectorResource result = await collection.GetAsync(connectorName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ LinkerResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Connector
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_Connector()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Connectors.json
+ // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationConnectorResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationConnectorCollection collection = resourceGroupResource.GetLocationConnectors(location);
+
+ // invoke the operation
+ string connectorName = "connectorName";
+ bool result = await collection.ExistsAsync(connectorName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Connector
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_Connector()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Connectors.json
+ // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationConnectorResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationConnectorCollection collection = resourceGroupResource.GetLocationConnectors(location);
+
+ // invoke the operation
+ string connectorName = "connectorName";
+ NullableResponse response = await collection.GetIfExistsAsync(connectorName);
+ LocationConnectorResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ LinkerResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // PutConnector
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_PutConnector()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/PutConnector.json
+ // this example is just showing the usage of "Connector_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationConnectorResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationConnectorCollection collection = resourceGroupResource.GetLocationConnectors(location);
+
+ // invoke the operation
+ string connectorName = "connectorName";
+ LinkerResourceData data = new LinkerResourceData()
+ {
+ TargetService = new AzureResourceInfo()
+ {
+ Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
+ },
+ AuthInfo = new SecretAuthInfo(),
+ SecretStore = new LinkerSecretStore()
+ {
+ KeyVaultId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv"),
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectorName, data);
+ LocationConnectorResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ LinkerResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationConnectorResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationConnectorResource.cs
new file mode 100644
index 000000000000..effc5fa12821
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationConnectorResource.cs
@@ -0,0 +1,183 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Samples
+{
+ public partial class Sample_LocationConnectorResource
+ {
+ // Connector
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_Connector()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/Connectors.json
+ // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationConnectorResource created on azure
+ // for more information of creating LocationConnectorResource, please refer to the document of LocationConnectorResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string connectorName = "connectorName";
+ ResourceIdentifier locationConnectorResourceId = LocationConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, connectorName);
+ LocationConnectorResource locationConnector = client.GetLocationConnectorResource(locationConnectorResourceId);
+
+ // invoke the operation
+ LocationConnectorResource result = await locationConnector.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ LinkerResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // DeleteConnector
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteConnector()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/DeleteConnector.json
+ // this example is just showing the usage of "Connector_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationConnectorResource created on azure
+ // for more information of creating LocationConnectorResource, please refer to the document of LocationConnectorResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string connectorName = "connectorName";
+ ResourceIdentifier locationConnectorResourceId = LocationConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, connectorName);
+ LocationConnectorResource locationConnector = client.GetLocationConnectorResource(locationConnectorResourceId);
+
+ // invoke the operation
+ await locationConnector.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // PatchConnector
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_PatchConnector()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/PatchConnector.json
+ // this example is just showing the usage of "Connector_Update" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationConnectorResource created on azure
+ // for more information of creating LocationConnectorResource, please refer to the document of LocationConnectorResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string connectorName = "connectorName";
+ ResourceIdentifier locationConnectorResourceId = LocationConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, connectorName);
+ LocationConnectorResource locationConnector = client.GetLocationConnectorResource(locationConnectorResourceId);
+
+ // invoke the operation
+ LinkerPatch patch = new LinkerPatch()
+ {
+ TargetService = new AzureResourceInfo()
+ {
+ Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
+ },
+ AuthInfo = new ServicePrincipalSecretAuthInfo("name", Guid.Parse("id"), "secret"),
+ };
+ ArmOperation lro = await locationConnector.UpdateAsync(WaitUntil.Completed, patch);
+ LocationConnectorResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ LinkerResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // ValidateConnectorSuccess
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Validate_ValidateConnectorSuccess()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ValidateConnectorSuccess.json
+ // this example is just showing the usage of "Connector_Validate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationConnectorResource created on azure
+ // for more information of creating LocationConnectorResource, please refer to the document of LocationConnectorResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string connectorName = "connectorName";
+ ResourceIdentifier locationConnectorResourceId = LocationConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, connectorName);
+ LocationConnectorResource locationConnector = client.GetLocationConnectorResource(locationConnectorResourceId);
+
+ // invoke the operation
+ ArmOperation lro = await locationConnector.ValidateAsync(WaitUntil.Completed);
+ LinkerValidateOperationResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // GenerateConfiguration
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GenerateConfigurations_GenerateConfiguration()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/GenerateConfigurations.json
+ // this example is just showing the usage of "Connector_GenerateConfigurations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationConnectorResource created on azure
+ // for more information of creating LocationConnectorResource, please refer to the document of LocationConnectorResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string connectorName = "connectorName";
+ ResourceIdentifier locationConnectorResourceId = LocationConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, connectorName);
+ LocationConnectorResource locationConnector = client.GetLocationConnectorResource(locationConnectorResourceId);
+
+ // invoke the operation
+ ConfigurationInfo info = new ConfigurationInfo()
+ {
+ CustomizedKeys =
+{
+["ASL_DocumentDb_ConnectionString"] = "MyConnectionstring",
+},
+ };
+ ConfigurationResult result = await locationConnector.GenerateConfigurationsAsync(info: info);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationDryrunCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationDryrunCollection.cs
new file mode 100644
index 000000000000..5a2325b44606
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationDryrunCollection.cs
@@ -0,0 +1,219 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Samples
+{
+ public partial class Sample_LocationDryrunCollection
+ {
+ // ConnectorDryrunList
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ConnectorDryrunList()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunList.json
+ // this example is just showing the usage of "Connector_ListDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationDryrunResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationDryrunCollection collection = resourceGroupResource.GetLocationDryruns(location);
+
+ // invoke the operation and iterate over the result
+ await foreach (LocationDryrunResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // ConnectorDryrunGet
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_ConnectorDryrunGet()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunGet.json
+ // this example is just showing the usage of "Connector_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationDryrunResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationDryrunCollection collection = resourceGroupResource.GetLocationDryruns(location);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ LocationDryrunResource result = await collection.GetAsync(dryrunName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // ConnectorDryrunGet
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_ConnectorDryrunGet()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunGet.json
+ // this example is just showing the usage of "Connector_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationDryrunResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationDryrunCollection collection = resourceGroupResource.GetLocationDryruns(location);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ bool result = await collection.ExistsAsync(dryrunName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // ConnectorDryrunGet
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_ConnectorDryrunGet()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunGet.json
+ // this example is just showing the usage of "Connector_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationDryrunResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationDryrunCollection collection = resourceGroupResource.GetLocationDryruns(location);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ NullableResponse response = await collection.GetIfExistsAsync(dryrunName);
+ LocationDryrunResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // ConnectorDryrunCreate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_ConnectorDryrunCreate()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunCreate.json
+ // this example is just showing the usage of "Connector_CreateDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this LocationDryrunResource
+ AzureLocation location = new AzureLocation("westus");
+ LocationDryrunCollection collection = resourceGroupResource.GetLocationDryruns(location);
+
+ // invoke the operation
+ string dryrunName = "dryrunName";
+ DryrunResourceData data = new DryrunResourceData()
+ {
+ Parameters = new CreateOrUpdateDryrunParameters()
+ {
+ TargetService = new AzureResourceInfo()
+ {
+ Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
+ },
+ AuthInfo = new SecretAuthInfo()
+ {
+ Name = "name",
+ SecretInfo = new RawValueSecretInfo()
+ {
+ Value = "secret",
+ },
+ },
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dryrunName, data);
+ LocationDryrunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationDryrunResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationDryrunResource.cs
new file mode 100644
index 000000000000..7dc993a7b4ad
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_LocationDryrunResource.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Samples
+{
+ public partial class Sample_LocationDryrunResource
+ {
+ // ConnectorDryrunGet
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_ConnectorDryrunGet()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunGet.json
+ // this example is just showing the usage of "Connector_GetDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationDryrunResource created on azure
+ // for more information of creating LocationDryrunResource, please refer to the document of LocationDryrunResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string dryrunName = "dryrunName";
+ ResourceIdentifier locationDryrunResourceId = LocationDryrunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, dryrunName);
+ LocationDryrunResource locationDryrun = client.GetLocationDryrunResource(locationDryrunResourceId);
+
+ // invoke the operation
+ LocationDryrunResource result = await locationDryrun.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // ConnectorDryrunUpdate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_ConnectorDryrunUpdate()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunUpdate.json
+ // this example is just showing the usage of "Connector_UpdateDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationDryrunResource created on azure
+ // for more information of creating LocationDryrunResource, please refer to the document of LocationDryrunResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string dryrunName = "dryrunName";
+ ResourceIdentifier locationDryrunResourceId = LocationDryrunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, dryrunName);
+ LocationDryrunResource locationDryrun = client.GetLocationDryrunResource(locationDryrunResourceId);
+
+ // invoke the operation
+ DryrunPatch patch = new DryrunPatch()
+ {
+ Parameters = new CreateOrUpdateDryrunParameters()
+ {
+ TargetService = new AzureResourceInfo()
+ {
+ Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"),
+ },
+ AuthInfo = new SecretAuthInfo()
+ {
+ Name = "name",
+ SecretInfo = new RawValueSecretInfo()
+ {
+ Value = "secret",
+ },
+ },
+ },
+ };
+ ArmOperation lro = await locationDryrun.UpdateAsync(WaitUntil.Completed, patch);
+ LocationDryrunResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DryrunResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // ConnectorDryrunDelete
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_ConnectorDryrunDelete()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConnectorDryrunDelete.json
+ // this example is just showing the usage of "Connector_DeleteDryrun" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this LocationDryrunResource created on azure
+ // for more information of creating LocationDryrunResource, please refer to the document of LocationDryrunResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "test-rg";
+ AzureLocation location = new AzureLocation("westus");
+ string dryrunName = "dryrunName";
+ ResourceIdentifier locationDryrunResourceId = LocationDryrunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, location, dryrunName);
+ LocationDryrunResource locationDryrun = client.GetLocationDryrunResource(locationDryrunResourceId);
+
+ // invoke the operation
+ await locationDryrun.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_TenantResourceExtensions.cs
new file mode 100644
index 000000000000..12bf0630e92a
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/samples/Generated/Samples/Sample_TenantResourceExtensions.cs
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Samples
+{
+ public partial class Sample_TenantResourceExtensions
+ {
+ // GetConfigurationNames
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetConfigurationNames_GetConfigurationNames()
+ {
+ // Generated from example definition: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2023-04-01-preview/examples/ConfigurationNamesList.json
+ // this example is just showing the usage of "ConfigurationNames_List" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this TenantResource created on azure
+ // for more information of creating TenantResource, please refer to the document of TenantResource
+ var tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current;
+
+ // invoke the operation and iterate over the result
+ await foreach (ConfigurationNameItem item in tenantResource.GetConfigurationNamesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/ArmServiceLinkerModelFactory.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/ArmServiceLinkerModelFactory.cs
index 7dde325c0c3a..4e2d01881164 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/ArmServiceLinkerModelFactory.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/ArmServiceLinkerModelFactory.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using Azure.Core;
using Azure.ResourceManager.Models;
@@ -16,6 +17,81 @@ namespace Azure.ResourceManager.ServiceLinker.Models
/// Model factory for models.
public static partial class ArmServiceLinkerModelFactory
{
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ ///
+ /// The parameters of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include .
+ ///
+ ///
+ /// the result of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ /// the preview of the operations for creation.
+ /// The provisioning state.
+ /// A new instance for mocking.
+ public static DryrunResourceData DryrunResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DryrunParameters parameters = null, IEnumerable prerequisiteResults = null, IEnumerable operationPreviews = null, string provisioningState = null)
+ {
+ prerequisiteResults ??= new List();
+ operationPreviews ??= new List();
+
+ return new DryrunResourceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ parameters,
+ prerequisiteResults?.ToList(),
+ operationPreviews?.ToList(),
+ provisioningState,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The operation name.
+ /// The operation type.
+ /// The description of the operation.
+ /// The action defined by RBAC, refer https://docs.microsoft.com/azure/role-based-access-control/role-definitions#actions-format.
+ /// The scope of the operation, refer https://docs.microsoft.com/azure/role-based-access-control/scope-overview.
+ /// A new instance for mocking.
+ public static DryrunOperationPreview DryrunOperationPreview(string name = null, DryrunPreviewOperationType? operationType = null, string description = null, string action = null, string scope = null)
+ {
+ return new DryrunOperationPreview(
+ name,
+ operationType,
+ description,
+ action,
+ scope,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The parameters of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include .
+ ///
+ ///
+ /// the result of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ /// the preview of the operations for creation.
+ /// The provisioning state.
+ /// A new instance for mocking.
+ public static DryrunPatch DryrunPatch(DryrunParameters parameters = null, IEnumerable prerequisiteResults = null, IEnumerable operationPreviews = null, string provisioningState = null)
+ {
+ prerequisiteResults ??= new List();
+ operationPreviews ??= new List();
+
+ return new DryrunPatch(parameters, prerequisiteResults?.ToList(), operationPreviews?.ToList(), provisioningState, serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -24,20 +100,22 @@ public static partial class ArmServiceLinkerModelFactory
///
/// The target service properties
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , and .
+ /// The available derived classes include , , and .
///
///
/// The authentication type.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , and .
+ /// The available derived classes include , , , , , , and .
///
/// The application client type.
/// The provisioning state.
- /// The VNet solution.
- /// An option to store secret value in secure place.
+ /// The VNet solution.
+ /// An option to store secret value in secure place.
/// connection scope in source service.
+ /// The network solution.
+ /// The connection information consumed by applications, including secrets, connection strings.
/// A new instance for mocking.
- public static LinkerResourceData LinkerResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TargetServiceBaseInfo targetService = null, AuthBaseInfo authInfo = null, LinkerClientType? clientType = null, string provisioningState = null, VnetSolutionType? solutionType = null, ResourceIdentifier secretStoreKeyVaultId = null, string scope = null)
+ public static LinkerResourceData LinkerResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, TargetServiceBaseInfo targetService = null, AuthBaseInfo authInfo = null, LinkerClientType? clientType = null, string provisioningState = null, VnetSolution vnetSolution = null, LinkerSecretStore secretStore = null, string scope = null, PublicNetworkSolution publicNetworkSolution = null, ConfigurationInfo configurationInfo = null)
{
return new LinkerResourceData(
id,
@@ -48,50 +126,81 @@ public static LinkerResourceData LinkerResourceData(ResourceIdentifier id = null
authInfo,
clientType,
provisioningState,
- solutionType != null ? new VnetSolution(solutionType, serializedAdditionalRawData: null) : null,
- secretStoreKeyVaultId != null ? new LinkerSecretStore(secretStoreKeyVaultId, serializedAdditionalRawData: null) : null,
+ vnetSolution,
+ secretStore,
scope,
+ publicNetworkSolution,
+ configurationInfo,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The dapr component version.
+ /// The dapr component type.
+ /// The name of a secret store dapr to retrieve secret.
+ /// Additional dapr metadata.
+ /// The dapr component scopes.
+ /// The runtime version supported by the properties.
+ /// The direction supported by the dapr binding component.
+ /// A new instance for mocking.
+ public static DaprProperties DaprProperties(string version = null, string componentType = null, string secretStoreComponent = null, IEnumerable metadata = null, IEnumerable scopes = null, string runtimeVersion = null, DaprBindingComponentDirection? bindingComponentDirection = null)
+ {
+ metadata ??= new List();
+ scopes ??= new List();
+
+ return new DaprProperties(
+ version,
+ componentType,
+ secretStoreComponent,
+ metadata?.ToList(),
+ scopes?.ToList(),
+ runtimeVersion,
+ bindingComponentDirection,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
///
/// The target service properties
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , and .
+ /// The available derived classes include , , and .
///
///
/// The authentication type.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , and .
+ /// The available derived classes include , , , , , , and .
///
/// The application client type.
/// The provisioning state.
- /// The VNet solution.
- /// An option to store secret value in secure place.
+ /// The VNet solution.
+ /// An option to store secret value in secure place.
/// connection scope in source service.
- /// A new instance for mocking.
- public static LinkerResourcePatch LinkerResourcePatch(TargetServiceBaseInfo targetService = null, AuthBaseInfo authInfo = null, LinkerClientType? clientType = null, string provisioningState = null, VnetSolutionType? solutionType = null, ResourceIdentifier secretStoreKeyVaultId = null, string scope = null)
+ /// The network solution.
+ /// The connection information consumed by applications, including secrets, connection strings.
+ /// A new instance for mocking.
+ public static LinkerPatch LinkerPatch(TargetServiceBaseInfo targetService = null, AuthBaseInfo authInfo = null, LinkerClientType? clientType = null, string provisioningState = null, VnetSolution vnetSolution = null, LinkerSecretStore secretStore = null, string scope = null, PublicNetworkSolution publicNetworkSolution = null, ConfigurationInfo configurationInfo = null)
{
- return new LinkerResourcePatch(
+ return new LinkerPatch(
targetService,
authInfo,
clientType,
provisioningState,
- solutionType != null ? new VnetSolution(solutionType, serializedAdditionalRawData: null) : null,
- secretStoreKeyVaultId != null ? new LinkerSecretStore(secretStoreKeyVaultId, serializedAdditionalRawData: null) : null,
+ vnetSolution,
+ secretStore,
scope,
+ publicNetworkSolution,
+ configurationInfo,
serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
- /// Validated linker id.
+ /// Validated Linker id.
/// Validation operation status.
/// The linker name.
/// A boolean value indicating whether the connection is available or not.
/// The start time of the validation report.
/// The end time of the validation report.
- /// The resource id of the linker source application.
+ /// The resource id of the Linker source application.
/// The resource Id of target service.
/// The authentication type.
/// The detail of validation result.
@@ -132,23 +241,140 @@ public static LinkerValidationResultItemInfo LinkerValidationResultItemInfo(stri
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The configuration properties for source resource.
- /// A new instance for mocking.
- public static SourceConfigurationResult SourceConfigurationResult(IEnumerable configurations = null)
+ /// A new instance for mocking.
+ public static ConfigurationResult ConfigurationResult(IEnumerable configurations = null)
{
configurations ??= new List();
- return new SourceConfigurationResult(configurations?.ToList(), serializedAdditionalRawData: null);
+ return new ConfigurationResult(configurations?.ToList(), serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
/// The name of setting.
/// The value of setting.
+ /// The type of setting.
+ /// The identity for key vault reference, system or user-assigned managed identity ID.
+ /// Descriptive information for the configuration.
/// A new instance for mocking.
- public static SourceConfiguration SourceConfiguration(string name = null, string value = null)
+ public static SourceConfiguration SourceConfiguration(string name = null, string value = null, LinkerConfigurationType? configType = null, string keyVaultReferenceIdentity = null, string description = null)
+ {
+ return new SourceConfiguration(
+ name,
+ value,
+ configType,
+ keyVaultReferenceIdentity,
+ description,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The target service provider name and resource name.
+ /// The client type for configuration names.
+ /// The auth type.
+ /// Indicates where the secrets in configuration from. Used when secrets are from Keyvault.
+ /// Deprecated, please use #/definitions/DaprConfigurationList instead.
+ /// The configuration names to be set in compute service environment.
+ /// A new instance for mocking.
+ public static ConfigurationNameItem ConfigurationNameItem(string targetService = null, LinkerClientType? clientType = null, LinkerAuthType? authType = null, SecretSourceType? secretType = null, DaprProperties daprProperties = null, IEnumerable names = null)
+ {
+ names ??= new List();
+
+ return new ConfigurationNameItem(
+ targetService,
+ clientType,
+ authType,
+ secretType,
+ daprProperties,
+ names?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// Description for the configuration name.
+ /// Represent the configuration is required or not.
+ /// A new instance for mocking.
+ public static ConfigurationName ConfigurationName(string value = null, string description = null, bool? required = null)
+ {
+ return new ConfigurationName(value, description, required, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Supported target resource type, extract from resource id, uppercase.
+ /// The authentication type.
+ /// Indicates some additional properties for dapr client type.
+ /// A new instance for mocking.
+ public static DaprConfigurationResource DaprConfigurationResource(string targetType = null, LinkerAuthType? authType = null, DaprProperties daprProperties = null)
+ {
+ return new DaprConfigurationResource(targetType, authType, daprProperties, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The target service properties
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , and .
+ ///
+ ///
+ /// The authentication type.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , , , , , and .
+ ///
+ /// The application client type.
+ /// The provisioning state.
+ /// The VNet solution.
+ /// An option to store secret value in secure place.
+ /// connection scope in source service.
+ /// The network solution.
+ /// The connection information consumed by applications, including secrets, connection strings.
+ /// A new instance for mocking.
+ public static CreateOrUpdateDryrunParameters CreateOrUpdateDryrunParameters(TargetServiceBaseInfo targetService = null, AuthBaseInfo authInfo = null, LinkerClientType? clientType = null, string provisioningState = null, VnetSolution vnetSolution = null, LinkerSecretStore secretStore = null, string scope = null, PublicNetworkSolution publicNetworkSolution = null, ConfigurationInfo configurationInfo = null)
+ {
+ return new CreateOrUpdateDryrunParameters(
+ DryrunActionName.CreateOrUpdate,
+ serializedAdditionalRawData: null,
+ targetService,
+ authInfo,
+ clientType,
+ provisioningState,
+ vnetSolution,
+ secretStore,
+ scope,
+ publicNetworkSolution,
+ configurationInfo);
+ }
+
+ /// Initializes a new instance of .
+ /// The error code.
+ /// The error message.
+ /// A new instance for mocking.
+ public static BasicErrorDryrunPrerequisiteResult BasicErrorDryrunPrerequisiteResult(string code = null, string message = null)
+ {
+ return new BasicErrorDryrunPrerequisiteResult(DryrunPrerequisiteResultType.BasicError, serializedAdditionalRawData: null, code, message);
+ }
+
+ /// Initializes a new instance of .
+ /// The permission scope.
+ /// The permission list.
+ /// The recommended role to resolve permissions missing.
+ /// A new instance for mocking.
+ public static PermissionsMissingDryrunPrerequisiteResult PermissionsMissingDryrunPrerequisiteResult(string scope = null, IEnumerable permissions = null, string recommendedRole = null)
+ {
+ permissions ??= new List();
+
+ return new PermissionsMissingDryrunPrerequisiteResult(DryrunPrerequisiteResultType.PermissionsMissing, serializedAdditionalRawData: null, scope, permissions?.ToList(), recommendedRole);
+ }
+
+ /// Initializes a new instance of .
+ /// The name of setting.
+ /// The value of setting.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static SourceConfiguration SourceConfiguration(string name, string value)
{
- return new SourceConfiguration(name, value, serializedAdditionalRawData: null);
+ return SourceConfiguration(name: name, value: value, configType: default, keyVaultReferenceIdentity: default, description: default);
}
}
}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunCollection.cs
new file mode 100644
index 000000000000..aac36df0f116
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunCollection.cs
@@ -0,0 +1,483 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetDryruns method from an instance of .
+ ///
+ public partial class DryrunCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _dryrunLinkersClientDiagnostics;
+ private readonly LinkersRestOperations _dryrunLinkersRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected DryrunCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal DryrunCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _dryrunLinkersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", DryrunResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(DryrunResource.ResourceType, out string dryrunLinkersApiVersion);
+ _dryrunLinkersRestClient = new LinkersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dryrunLinkersApiVersion);
+ }
+
+ ///
+ /// create a dryrun job to do necessary check before actual creation
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_CreateDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of dryrun.
+ /// dryrun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string dryrunName, DryrunResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.CreateDryrunAsync(Id, dryrunName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new DryrunOperationSource(Client), _dryrunLinkersClientDiagnostics, Pipeline, _dryrunLinkersRestClient.CreateCreateDryrunRequest(Id, dryrunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// create a dryrun job to do necessary check before actual creation
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_CreateDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of dryrun.
+ /// dryrun resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string dryrunName, DryrunResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.CreateDryrun(Id, dryrunName, data, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new DryrunOperationSource(Client), _dryrunLinkersClientDiagnostics, Pipeline, _dryrunLinkersRestClient.CreateCreateDryrunRequest(Id, dryrunName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.GetDryrunAsync(Id, dryrunName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DryrunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.GetDryrun(Id, dryrunName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DryrunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// list dryrun jobs
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_ListDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _dryrunLinkersRestClient.CreateListDryrunRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dryrunLinkersRestClient.CreateListDryrunNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DryrunResource(Client, DryrunResourceData.DeserializeDryrunResourceData(e)), _dryrunLinkersClientDiagnostics, Pipeline, "DryrunCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// list dryrun jobs
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_ListDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _dryrunLinkersRestClient.CreateListDryrunRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dryrunLinkersRestClient.CreateListDryrunNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DryrunResource(Client, DryrunResourceData.DeserializeDryrunResourceData(e)), _dryrunLinkersClientDiagnostics, Pipeline, "DryrunCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.GetDryrunAsync(Id, dryrunName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.GetDryrun(Id, dryrunName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.GetDryrunAsync(Id, dryrunName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DryrunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(dryrunName, nameof(dryrunName));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.GetDryrun(Id, dryrunName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new DryrunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResource.Serialization.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResource.Serialization.cs
new file mode 100644
index 000000000000..f7231ecd4f86
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ public partial class DryrunResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ DryrunResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ DryrunResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResource.cs
new file mode 100644
index 000000000000..7f7aa241c682
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResource.cs
@@ -0,0 +1,350 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ ///
+ /// A Class representing a Dryrun along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetDryrunResource method.
+ /// Otherwise you can get one from its parent resource using the GetDryrun method.
+ ///
+ public partial class DryrunResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The resourceUri.
+ /// The dryrunName.
+ public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, string dryrunName)
+ {
+ var resourceId = $"{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _dryrunLinkersClientDiagnostics;
+ private readonly LinkersRestOperations _dryrunLinkersRestClient;
+ private readonly DryrunResourceData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ServiceLinker/dryruns";
+
+ /// Initializes a new instance of the class for mocking.
+ protected DryrunResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal DryrunResource(ArmClient client, DryrunResourceData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal DryrunResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _dryrunLinkersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string dryrunLinkersApiVersion);
+ _dryrunLinkersRestClient = new LinkersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dryrunLinkersApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual DryrunResourceData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.GetDryrunAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DryrunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.GetDryrun(Id.Parent, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new DryrunResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// delete a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_DeleteDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.DeleteDryrunAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var uri = _dryrunLinkersRestClient.CreateDeleteDryrunRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ServiceLinkerArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// delete a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_DeleteDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.DeleteDryrun(Id.Parent, Id.Name, cancellationToken);
+ var uri = _dryrunLinkersRestClient.CreateDeleteDryrunRequestUri(Id.Parent, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ServiceLinkerArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// add a dryrun job to do necessary check before actual creation
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_UpdateDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// dryrun resource.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, DryrunPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.UpdateDryrunAsync(Id.Parent, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new DryrunOperationSource(Client), _dryrunLinkersClientDiagnostics, Pipeline, _dryrunLinkersRestClient.CreateUpdateDryrunRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// add a dryrun job to do necessary check before actual creation
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_UpdateDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// dryrun resource.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, DryrunPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("DryrunResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.UpdateDryrun(Id.Parent, Id.Name, patch, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new DryrunOperationSource(Client), _dryrunLinkersClientDiagnostics, Pipeline, _dryrunLinkersRestClient.CreateUpdateDryrunRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResourceData.Serialization.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResourceData.Serialization.cs
new file mode 100644
index 000000000000..a58e3c9a2b6b
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResourceData.Serialization.cs
@@ -0,0 +1,261 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ public partial class DryrunResourceData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DryrunResourceData)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("id"u8);
+ writer.WriteStringValue(Id);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("type"u8);
+ writer.WriteStringValue(ResourceType);
+ }
+ if (options.Format != "W" && Optional.IsDefined(SystemData))
+ {
+ writer.WritePropertyName("systemData"u8);
+ JsonSerializer.Serialize(writer, SystemData);
+ }
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Parameters))
+ {
+ writer.WritePropertyName("parameters"u8);
+ writer.WriteObjectValue(Parameters, options);
+ }
+ if (options.Format != "W" && Optional.IsCollectionDefined(PrerequisiteResults))
+ {
+ writer.WritePropertyName("prerequisiteResults"u8);
+ writer.WriteStartArray();
+ foreach (var item in PrerequisiteResults)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (options.Format != "W" && Optional.IsCollectionDefined(OperationPreviews))
+ {
+ writer.WritePropertyName("operationPreviews"u8);
+ writer.WriteStartArray();
+ foreach (var item in OperationPreviews)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (options.Format != "W" && Optional.IsDefined(ProvisioningState))
+ {
+ writer.WritePropertyName("provisioningState"u8);
+ writer.WriteStringValue(ProvisioningState);
+ }
+ writer.WriteEndObject();
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ DryrunResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(DryrunResourceData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeDryrunResourceData(document.RootElement, options);
+ }
+
+ internal static DryrunResourceData DeserializeDryrunResourceData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ DryrunParameters parameters = default;
+ IReadOnlyList prerequisiteResults = default;
+ IReadOnlyList operationPreviews = default;
+ string provisioningState = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("parameters"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ parameters = DryrunParameters.DeserializeDryrunParameters(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("prerequisiteResults"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ array.Add(DryrunPrerequisiteResult.DeserializeDryrunPrerequisiteResult(item, options));
+ }
+ prerequisiteResults = array;
+ continue;
+ }
+ if (property0.NameEquals("operationPreviews"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ array.Add(DryrunOperationPreview.DeserializeDryrunOperationPreview(item, options));
+ }
+ operationPreviews = array;
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ provisioningState = property0.Value.GetString();
+ continue;
+ }
+ }
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new DryrunResourceData(
+ id,
+ name,
+ type,
+ systemData,
+ parameters,
+ prerequisiteResults ?? new ChangeTrackingList(),
+ operationPreviews ?? new ChangeTrackingList(),
+ provisioningState,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(DryrunResourceData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ DryrunResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeDryrunResourceData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(DryrunResourceData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResourceData.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResourceData.cs
new file mode 100644
index 000000000000..40f63c8b4934
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/DryrunResourceData.cs
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ ///
+ /// A class representing the DryrunResource data model.
+ /// a dryrun job resource
+ ///
+ public partial class DryrunResourceData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public DryrunResourceData()
+ {
+ PrerequisiteResults = new ChangeTrackingList();
+ OperationPreviews = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ ///
+ /// The parameters of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include .
+ ///
+ ///
+ /// the result of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ /// the preview of the operations for creation.
+ /// The provisioning state.
+ /// Keeps track of any properties unknown to the library.
+ internal DryrunResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DryrunParameters parameters, IReadOnlyList prerequisiteResults, IReadOnlyList operationPreviews, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Parameters = parameters;
+ PrerequisiteResults = prerequisiteResults;
+ OperationPreviews = operationPreviews;
+ ProvisioningState = provisioningState;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ ///
+ /// The parameters of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include .
+ ///
+ public DryrunParameters Parameters { get; set; }
+ ///
+ /// the result of the dryrun
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ public IReadOnlyList PrerequisiteResults { get; }
+ /// the preview of the operations for creation.
+ public IReadOnlyList OperationPreviews { get; }
+ /// The provisioning state.
+ public string ProvisioningState { get; }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmClient.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmClient.cs
index 70f5c2afafb0..9d1dafa84588 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmClient.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmClient.cs
@@ -8,13 +8,19 @@
using System;
using System.Threading;
using System.Threading.Tasks;
+using Autorest.CSharp.Core;
using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.ServiceLinker.Models;
namespace Azure.ResourceManager.ServiceLinker.Mocking
{
/// A class to add extension methods to ArmClient.
public partial class MockableServiceLinkerArmClient : ArmResource
{
+ private ClientDiagnostics _dryrunLinkersClientDiagnostics;
+ private LinkersRestOperations _dryrunLinkersRestClient;
+
/// Initializes a new instance of the class for mocking.
protected MockableServiceLinkerArmClient()
{
@@ -31,18 +37,93 @@ internal MockableServiceLinkerArmClient(ArmClient client) : this(client, Resourc
{
}
+ private ClientDiagnostics DryrunLinkersClientDiagnostics => _dryrunLinkersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", DryrunResource.ResourceType.Namespace, Diagnostics);
+ private LinkersRestOperations DryrunLinkersRestClient => _dryrunLinkersRestClient ??= new LinkersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DryrunResource.ResourceType));
+
private string GetApiVersionOrNull(ResourceType resourceType)
{
TryGetApiVersion(resourceType, out string apiVersion);
return apiVersion;
}
+ /// Gets a collection of DryrunResources in the ArmClient.
+ /// The scope that the resource will apply against.
+ /// An object representing collection of DryrunResources and their operations over a DryrunResource.
+ public virtual DryrunCollection GetDryruns(ResourceIdentifier scope)
+ {
+ return new DryrunCollection(Client, scope);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetDryrunAsync(ResourceIdentifier scope, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ return await GetDryruns(scope).GetAsync(dryrunName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetDryrun(ResourceIdentifier scope, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ return GetDryruns(scope).Get(dryrunName, cancellationToken);
+ }
+
/// Gets a collection of LinkerResources in the ArmClient.
/// The scope that the resource will apply against.
/// An object representing collection of LinkerResources and their operations over a LinkerResource.
- public virtual LinkerResourceCollection GetLinkerResources(ResourceIdentifier scope)
+ public virtual LinkerCollection GetLinkers(ResourceIdentifier scope)
{
- return new LinkerResourceCollection(Client, scope);
+ return new LinkerCollection(Client, scope);
}
///
@@ -58,7 +139,7 @@ public virtual LinkerResourceCollection GetLinkerResources(ResourceIdentifier sc
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -72,9 +153,9 @@ public virtual LinkerResourceCollection GetLinkerResources(ResourceIdentifier sc
/// is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual async Task> GetLinkerResourceAsync(ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
+ public virtual async Task> GetLinkerAsync(ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
{
- return await GetLinkerResources(scope).GetAsync(linkerName, cancellationToken).ConfigureAwait(false);
+ return await GetLinkers(scope).GetAsync(linkerName, cancellationToken).ConfigureAwait(false);
}
///
@@ -90,7 +171,7 @@ public virtual async Task> GetLinkerResourceAsync(Resou
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -104,9 +185,112 @@ public virtual async Task> GetLinkerResourceAsync(Resou
/// is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual Response GetLinkerResource(ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
+ public virtual Response GetLinker(ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
+ {
+ return GetLinkers(scope).Get(linkerName, cancellationToken);
+ }
+
+ ///
+ /// List the dapr configuration supported by Service Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/daprConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_ListDaprConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetDaprConfigurationsLinkersAsync(ResourceIdentifier scope, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(scope, nameof(scope));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => DryrunLinkersRestClient.CreateListDaprConfigurationsRequest(scope);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DryrunLinkersRestClient.CreateListDaprConfigurationsNextPageRequest(nextLink, scope);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DaprConfigurationResource.DeserializeDaprConfigurationResource(e), DryrunLinkersClientDiagnostics, Pipeline, "MockableServiceLinkerArmClient.GetDaprConfigurationsLinkers", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List the dapr configuration supported by Service Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/daprConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_ListDaprConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The scope that the resource will apply against.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetDaprConfigurationsLinkers(ResourceIdentifier scope, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(scope, nameof(scope));
+
+ HttpMessage FirstPageRequest(int? pageSizeHint) => DryrunLinkersRestClient.CreateListDaprConfigurationsRequest(scope);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DryrunLinkersRestClient.CreateListDaprConfigurationsNextPageRequest(nextLink, scope);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DaprConfigurationResource.DeserializeDaprConfigurationResource(e), DryrunLinkersClientDiagnostics, Pipeline, "MockableServiceLinkerArmClient.GetDaprConfigurationsLinkers", "value", "nextLink", cancellationToken);
+ }
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual LocationDryrunResource GetLocationDryrunResource(ResourceIdentifier id)
+ {
+ LocationDryrunResource.ValidateResourceId(id);
+ return new LocationDryrunResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual DryrunResource GetDryrunResource(ResourceIdentifier id)
+ {
+ DryrunResource.ValidateResourceId(id);
+ return new DryrunResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual LocationConnectorResource GetLocationConnectorResource(ResourceIdentifier id)
{
- return GetLinkerResources(scope).Get(linkerName, cancellationToken);
+ LocationConnectorResource.ValidateResourceId(id);
+ return new LocationConnectorResource(Client, id);
}
///
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmResource.cs
index 3ab29c77b49b..968d81b0c480 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmResource.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerArmResource.cs
@@ -35,9 +35,9 @@ private string GetApiVersionOrNull(ResourceType resourceType)
/// Gets a collection of LinkerResources in the ArmResource.
/// An object representing collection of LinkerResources and their operations over a LinkerResource.
- public virtual LinkerResourceCollection GetLinkerResources()
+ public virtual LinkerCollection GetLinkers()
{
- return GetCachedClient(client => new LinkerResourceCollection(client, Id));
+ return GetCachedClient(client => new LinkerCollection(client, Id));
}
///
@@ -53,7 +53,7 @@ public virtual LinkerResourceCollection GetLinkerResources()
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -66,9 +66,9 @@ public virtual LinkerResourceCollection GetLinkerResources()
/// is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual async Task> GetLinkerResourceAsync(string linkerName, CancellationToken cancellationToken = default)
+ public virtual async Task> GetLinkerAsync(string linkerName, CancellationToken cancellationToken = default)
{
- return await GetLinkerResources().GetAsync(linkerName, cancellationToken).ConfigureAwait(false);
+ return await GetLinkers().GetAsync(linkerName, cancellationToken).ConfigureAwait(false);
}
///
@@ -84,7 +84,7 @@ public virtual async Task> GetLinkerResourceAsync(strin
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -97,9 +97,9 @@ public virtual async Task> GetLinkerResourceAsync(strin
/// is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public virtual Response GetLinkerResource(string linkerName, CancellationToken cancellationToken = default)
+ public virtual Response GetLinker(string linkerName, CancellationToken cancellationToken = default)
{
- return GetLinkerResources().Get(linkerName, cancellationToken);
+ return GetLinkers().Get(linkerName, cancellationToken);
}
}
}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerResourceGroupResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerResourceGroupResource.cs
new file mode 100644
index 000000000000..5d257c85dd5a
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerResourceGroupResource.cs
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+
+namespace Azure.ResourceManager.ServiceLinker.Mocking
+{
+ /// A class to add extension methods to ResourceGroupResource.
+ public partial class MockableServiceLinkerResourceGroupResource : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableServiceLinkerResourceGroupResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableServiceLinkerResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ /// Gets a collection of LocationDryrunResources in the ResourceGroupResource.
+ /// The name of Azure region.
+ /// An object representing collection of LocationDryrunResources and their operations over a LocationDryrunResource.
+ public virtual LocationDryrunCollection GetLocationDryruns(AzureLocation location)
+ {
+ return new LocationDryrunCollection(Client, Id, location);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of Azure region.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetLocationDryrunAsync(AzureLocation location, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ return await GetLocationDryruns(location).GetAsync(dryrunName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of Azure region.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetLocationDryrun(AzureLocation location, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ return GetLocationDryruns(location).Get(dryrunName, cancellationToken);
+ }
+
+ /// Gets a collection of LocationConnectorResources in the ResourceGroupResource.
+ /// The name of Azure region.
+ /// An object representing collection of LocationConnectorResources and their operations over a LocationConnectorResource.
+ public virtual LocationConnectorCollection GetLocationConnectors(AzureLocation location)
+ {
+ return new LocationConnectorCollection(Client, Id, location);
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of Azure region.
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetLocationConnectorAsync(AzureLocation location, string connectorName, CancellationToken cancellationToken = default)
+ {
+ return await GetLocationConnectors(location).GetAsync(connectorName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of Azure region.
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetLocationConnector(AzureLocation location, string connectorName, CancellationToken cancellationToken = default)
+ {
+ return GetLocationConnectors(location).Get(connectorName, cancellationToken);
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerTenantResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerTenantResource.cs
new file mode 100644
index 000000000000..42359db48951
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/MockableServiceLinkerTenantResource.cs
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker.Mocking
+{
+ /// A class to add extension methods to TenantResource.
+ public partial class MockableServiceLinkerTenantResource : ArmResource
+ {
+ private ClientDiagnostics _configurationNamesClientDiagnostics;
+ private ConfigurationNamesRestOperations _configurationNamesRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MockableServiceLinkerTenantResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableServiceLinkerTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics ConfigurationNamesClientDiagnostics => _configurationNamesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ private ConfigurationNamesRestOperations ConfigurationNamesRestClient => _configurationNamesRestClient ??= new ConfigurationNamesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// Lists the configuration names generated by Service Connector for all target, client types, auth types.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.ServiceLinker/configurationNames
+ ///
+ /// -
+ /// Operation Id
+ /// ConfigurationNames_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ ///
+ ///
+ /// OData filter options.
+ /// OData skipToken option for pagination.
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetConfigurationNamesAsync(string filter = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => ConfigurationNamesRestClient.CreateListRequest(filter, skipToken);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ConfigurationNamesRestClient.CreateListNextPageRequest(nextLink, filter, skipToken);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ConfigurationNameItem.DeserializeConfigurationNameItem(e), ConfigurationNamesClientDiagnostics, Pipeline, "MockableServiceLinkerTenantResource.GetConfigurationNames", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists the configuration names generated by Service Connector for all target, client types, auth types.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.ServiceLinker/configurationNames
+ ///
+ /// -
+ /// Operation Id
+ /// ConfigurationNames_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ ///
+ ///
+ /// OData filter options.
+ /// OData skipToken option for pagination.
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetConfigurationNames(string filter = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => ConfigurationNamesRestClient.CreateListRequest(filter, skipToken);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ConfigurationNamesRestClient.CreateListNextPageRequest(nextLink, filter, skipToken);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ConfigurationNameItem.DeserializeConfigurationNameItem(e), ConfigurationNamesClientDiagnostics, Pipeline, "MockableServiceLinkerTenantResource.GetConfigurationNames", "value", "nextLink", cancellationToken);
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/ServiceLinkerExtensions.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/ServiceLinkerExtensions.cs
index c1f30b097150..f21e07a2bdb9 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/ServiceLinkerExtensions.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/Extensions/ServiceLinkerExtensions.cs
@@ -9,7 +9,9 @@
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
+using Azure.ResourceManager.Resources;
using Azure.ResourceManager.ServiceLinker.Mocking;
+using Azure.ResourceManager.ServiceLinker.Models;
namespace Azure.ResourceManager.ServiceLinker
{
@@ -26,22 +28,128 @@ private static MockableServiceLinkerArmResource GetMockableServiceLinkerArmResou
return resource.GetCachedClient(client => new MockableServiceLinkerArmResource(client, resource.Id));
}
+ private static MockableServiceLinkerResourceGroupResource GetMockableServiceLinkerResourceGroupResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableServiceLinkerResourceGroupResource(client, resource.Id));
+ }
+
+ private static MockableServiceLinkerTenantResource GetMockableServiceLinkerTenantResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableServiceLinkerTenantResource(client, resource.Id));
+ }
+
+ ///
+ /// Gets a collection of DryrunResources in the ArmClient.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// is null.
+ /// An object representing collection of DryrunResources and their operations over a DryrunResource.
+ public static DryrunCollection GetDryruns(this ArmClient client, ResourceIdentifier scope)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableServiceLinkerArmClient(client).GetDryruns(scope);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetDryrunAsync(this ArmClient client, ResourceIdentifier scope, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return await GetMockableServiceLinkerArmClient(client).GetDryrunAsync(scope, dryrunName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetDryrun(this ArmClient client, ResourceIdentifier scope, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableServiceLinkerArmClient(client).GetDryrun(scope, dryrunName, cancellationToken);
+ }
+
///
/// Gets a collection of LinkerResources in the ArmClient.
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// The scope that the resource will apply against.
/// is null.
/// An object representing collection of LinkerResources and their operations over a LinkerResource.
- public static LinkerResourceCollection GetLinkerResources(this ArmClient client, ResourceIdentifier scope)
+ public static LinkerCollection GetLinkers(this ArmClient client, ResourceIdentifier scope)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableServiceLinkerArmClient(client).GetLinkerResources(scope);
+ return GetMockableServiceLinkerArmClient(client).GetLinkers(scope);
}
///
@@ -57,7 +165,7 @@ public static LinkerResourceCollection GetLinkerResources(this ArmClient client,
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -66,7 +174,7 @@ public static LinkerResourceCollection GetLinkerResources(this ArmClient client,
///
///
-
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
@@ -76,11 +184,11 @@ public static LinkerResourceCollection GetLinkerResources(this ArmClient client,
/// or is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static async Task> GetLinkerResourceAsync(this ArmClient client, ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
+ public static async Task> GetLinkerAsync(this ArmClient client, ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(client, nameof(client));
- return await GetMockableServiceLinkerArmClient(client).GetLinkerResourceAsync(scope, linkerName, cancellationToken).ConfigureAwait(false);
+ return await GetMockableServiceLinkerArmClient(client).GetLinkerAsync(scope, linkerName, cancellationToken).ConfigureAwait(false);
}
///
@@ -96,7 +204,7 @@ public static async Task> GetLinkerResourceAsync(this A
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -105,7 +213,7 @@ public static async Task> GetLinkerResourceAsync(this A
///
///
-
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
@@ -115,11 +223,140 @@ public static async Task> GetLinkerResourceAsync(this A
/// or is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static Response GetLinkerResource(this ArmClient client, ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
+ public static Response GetLinker(this ArmClient client, ResourceIdentifier scope, string linkerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableServiceLinkerArmClient(client).GetLinker(scope, linkerName, cancellationToken);
+ }
+
+ ///
+ /// List the dapr configuration supported by Service Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/daprConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_ListDaprConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The cancellation token to use.
+ /// is null.
+ public static AsyncPageable GetDaprConfigurationsLinkersAsync(this ArmClient client, ResourceIdentifier scope, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableServiceLinkerArmClient(client).GetDaprConfigurationsLinkersAsync(scope, cancellationToken);
+ }
+
+ ///
+ /// List the dapr configuration supported by Service Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/daprConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_ListDaprConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The scope that the resource will apply against.
+ /// The cancellation token to use.
+ /// is null.
+ public static Pageable GetDaprConfigurationsLinkers(this ArmClient client, ResourceIdentifier scope, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableServiceLinkerArmClient(client).GetDaprConfigurationsLinkers(scope, cancellationToken);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static LocationDryrunResource GetLocationDryrunResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableServiceLinkerArmClient(client).GetLocationDryrunResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static DryrunResource GetDryrunResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableServiceLinkerArmClient(client).GetDryrunResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static LocationConnectorResource GetLocationConnectorResource(this ArmClient client, ResourceIdentifier id)
{
Argument.AssertNotNull(client, nameof(client));
- return GetMockableServiceLinkerArmClient(client).GetLinkerResource(scope, linkerName, cancellationToken);
+ return GetMockableServiceLinkerArmClient(client).GetLocationConnectorResource(id);
}
///
@@ -145,17 +382,17 @@ public static LinkerResource GetLinkerResource(this ArmClient client, ResourceId
/// Gets a collection of LinkerResources in the ArmResource.
/// -
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
/// is null.
/// An object representing collection of LinkerResources and their operations over a LinkerResource.
- public static LinkerResourceCollection GetLinkerResources(this ArmResource armResource)
+ public static LinkerCollection GetLinkers(this ArmResource armResource)
{
Argument.AssertNotNull(armResource, nameof(armResource));
- return GetMockableServiceLinkerArmResource(armResource).GetLinkerResources();
+ return GetMockableServiceLinkerArmResource(armResource).GetLinkers();
}
///
@@ -171,7 +408,7 @@ public static LinkerResourceCollection GetLinkerResources(this ArmResource armRe
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -180,7 +417,7 @@ public static LinkerResourceCollection GetLinkerResources(this ArmResource armRe
///
///
-
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
@@ -189,11 +426,11 @@ public static LinkerResourceCollection GetLinkerResources(this ArmResource armRe
/// or is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static async Task> GetLinkerResourceAsync(this ArmResource armResource, string linkerName, CancellationToken cancellationToken = default)
+ public static async Task> GetLinkerAsync(this ArmResource armResource, string linkerName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(armResource, nameof(armResource));
- return await GetMockableServiceLinkerArmResource(armResource).GetLinkerResourceAsync(linkerName, cancellationToken).ConfigureAwait(false);
+ return await GetMockableServiceLinkerArmResource(armResource).GetLinkerAsync(linkerName, cancellationToken).ConfigureAwait(false);
}
///
@@ -209,7 +446,7 @@ public static async Task> GetLinkerResourceAsync(this A
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -218,7 +455,7 @@ public static async Task> GetLinkerResourceAsync(this A
///
///
-
/// Mocking
- /// To mock this method, please mock instead.
+ /// To mock this method, please mock instead.
///
///
/// The instance the method will execute against.
@@ -227,11 +464,271 @@ public static async Task> GetLinkerResourceAsync(this A
/// or is null.
/// is an empty string, and was expected to be non-empty.
[ForwardsClientCalls]
- public static Response GetLinkerResource(this ArmResource armResource, string linkerName, CancellationToken cancellationToken = default)
+ public static Response GetLinker(this ArmResource armResource, string linkerName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(armResource, nameof(armResource));
- return GetMockableServiceLinkerArmResource(armResource).GetLinkerResource(linkerName, cancellationToken);
+ return GetMockableServiceLinkerArmResource(armResource).GetLinker(linkerName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of LocationDryrunResources in the ResourceGroupResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of Azure region.
+ /// is null.
+ /// An object representing collection of LocationDryrunResources and their operations over a LocationDryrunResource.
+ public static LocationDryrunCollection GetLocationDryruns(this ResourceGroupResource resourceGroupResource, AzureLocation location)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableServiceLinkerResourceGroupResource(resourceGroupResource).GetLocationDryruns(location);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of Azure region.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetLocationDryrunAsync(this ResourceGroupResource resourceGroupResource, AzureLocation location, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableServiceLinkerResourceGroupResource(resourceGroupResource).GetLocationDryrunAsync(location, dryrunName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// get a dryrun job
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_GetDryrun
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of Azure region.
+ /// The name of dryrun.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetLocationDryrun(this ResourceGroupResource resourceGroupResource, AzureLocation location, string dryrunName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableServiceLinkerResourceGroupResource(resourceGroupResource).GetLocationDryrun(location, dryrunName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of LocationConnectorResources in the ResourceGroupResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of Azure region.
+ /// is null.
+ /// An object representing collection of LocationConnectorResources and their operations over a LocationConnectorResource.
+ public static LocationConnectorCollection GetLocationConnectors(this ResourceGroupResource resourceGroupResource, AzureLocation location)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableServiceLinkerResourceGroupResource(resourceGroupResource).GetLocationConnectors(location);
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of Azure region.
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetLocationConnectorAsync(this ResourceGroupResource resourceGroupResource, AzureLocation location, string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableServiceLinkerResourceGroupResource(resourceGroupResource).GetLocationConnectorAsync(location, connectorName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of Azure region.
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetLocationConnector(this ResourceGroupResource resourceGroupResource, AzureLocation location, string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableServiceLinkerResourceGroupResource(resourceGroupResource).GetLocationConnector(location, connectorName, cancellationToken);
+ }
+
+ ///
+ /// Lists the configuration names generated by Service Connector for all target, client types, auth types.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.ServiceLinker/configurationNames
+ ///
+ /// -
+ /// Operation Id
+ /// ConfigurationNames_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// OData filter options.
+ /// OData skipToken option for pagination.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetConfigurationNamesAsync(this TenantResource tenantResource, string filter = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableServiceLinkerTenantResource(tenantResource).GetConfigurationNamesAsync(filter, skipToken, cancellationToken);
+ }
+
+ ///
+ /// Lists the configuration names generated by Service Connector for all target, client types, auth types.
+ ///
+ /// -
+ /// Request Path
+ /// /providers/Microsoft.ServiceLinker/configurationNames
+ ///
+ /// -
+ /// Operation Id
+ /// ConfigurationNames_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// OData filter options.
+ /// OData skipToken option for pagination.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetConfigurationNames(this TenantResource tenantResource, string filter = null, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tenantResource, nameof(tenantResource));
+
+ return GetMockableServiceLinkerTenantResource(tenantResource).GetConfigurationNames(filter, skipToken, cancellationToken);
}
}
}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerCollection.cs
similarity index 80%
rename from sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceCollection.cs
rename to sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerCollection.cs
index 23ce6c384ebd..e3eb7f32e6b7 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceCollection.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerCollection.cs
@@ -19,30 +19,30 @@ namespace Azure.ResourceManager.ServiceLinker
///
/// A class representing a collection of and their operations.
/// Each in the collection will belong to the same instance of .
- /// To get a instance call the GetLinkerResources method from an instance of .
+ /// To get a instance call the GetLinkers method from an instance of .
///
- public partial class LinkerResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ public partial class LinkerCollection : ArmCollection, IEnumerable, IAsyncEnumerable
{
- private readonly ClientDiagnostics _linkerResourceLinkerClientDiagnostics;
- private readonly LinkerRestOperations _linkerResourceLinkerRestClient;
+ private readonly ClientDiagnostics _linkerClientDiagnostics;
+ private readonly LinkerRestOperations _linkerRestClient;
- /// Initializes a new instance of the class for mocking.
- protected LinkerResourceCollection()
+ /// Initializes a new instance of the class for mocking.
+ protected LinkerCollection()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
/// The client parameters to use in these operations.
/// The identifier of the parent resource that is the target of operations.
- internal LinkerResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ internal LinkerCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
{
- _linkerResourceLinkerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", LinkerResource.ResourceType.Namespace, Diagnostics);
- TryGetApiVersion(LinkerResource.ResourceType, out string linkerResourceLinkerApiVersion);
- _linkerResourceLinkerRestClient = new LinkerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, linkerResourceLinkerApiVersion);
+ _linkerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", LinkerResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(LinkerResource.ResourceType, out string linkerApiVersion);
+ _linkerRestClient = new LinkerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, linkerApiVersion);
}
///
- /// Create or update linker resource.
+ /// Create or update Linker resource.
///
/// -
/// Request Path
@@ -54,7 +54,7 @@ internal LinkerResourceCollection(ArmClient client, ResourceIdentifier id) : bas
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -73,12 +73,12 @@ public virtual async Task> CreateOrUpdateAsync(Wait
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
Argument.AssertNotNull(data, nameof(data));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.CreateOrUpdate");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.CreateOrUpdate");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.CreateOrUpdateAsync(Id, linkerName, data, cancellationToken).ConfigureAwait(false);
- var operation = new ServiceLinkerArmOperation(new LinkerResourceOperationSource(Client), _linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateCreateOrUpdateRequest(Id, linkerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = await _linkerRestClient.CreateOrUpdateAsync(Id, linkerName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new LinkerOperationSource(Client), _linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateCreateOrUpdateRequest(Id, linkerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -91,7 +91,7 @@ public virtual async Task> CreateOrUpdateAsync(Wait
}
///
- /// Create or update linker resource.
+ /// Create or update Linker resource.
///
/// -
/// Request Path
@@ -103,7 +103,7 @@ public virtual async Task> CreateOrUpdateAsync(Wait
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -122,12 +122,12 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil,
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
Argument.AssertNotNull(data, nameof(data));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.CreateOrUpdate");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.CreateOrUpdate");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.CreateOrUpdate(Id, linkerName, data, cancellationToken);
- var operation = new ServiceLinkerArmOperation(new LinkerResourceOperationSource(Client), _linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateCreateOrUpdateRequest(Id, linkerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = _linkerRestClient.CreateOrUpdate(Id, linkerName, data, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new LinkerOperationSource(Client), _linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateCreateOrUpdateRequest(Id, linkerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -152,7 +152,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil,
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -168,11 +168,11 @@ public virtual async Task> GetAsync(string linkerName,
{
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.Get");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.Get");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.GetAsync(Id, linkerName, cancellationToken).ConfigureAwait(false);
+ var response = await _linkerRestClient.GetAsync(Id, linkerName, cancellationToken).ConfigureAwait(false);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
return Response.FromValue(new LinkerResource(Client, response.Value), response.GetRawResponse());
@@ -197,7 +197,7 @@ public virtual async Task> GetAsync(string linkerName,
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -213,11 +213,11 @@ public virtual Response Get(string linkerName, CancellationToken
{
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.Get");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.Get");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.Get(Id, linkerName, cancellationToken);
+ var response = _linkerRestClient.Get(Id, linkerName, cancellationToken);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
return Response.FromValue(new LinkerResource(Client, response.Value), response.GetRawResponse());
@@ -230,7 +230,7 @@ public virtual Response Get(string linkerName, CancellationToken
}
///
- /// Returns list of Linkers which connects to the resource.
+ /// Returns list of Linkers which connects to the resource. which supports to config both application and target service during the resource provision.
///
/// -
/// Request Path
@@ -242,7 +242,7 @@ public virtual Response Get(string linkerName, CancellationToken
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -254,13 +254,13 @@ public virtual Response Get(string linkerName, CancellationToken
/// An async collection of that may take multiple service requests to iterate over.
public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => _linkerResourceLinkerRestClient.CreateListRequest(Id);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _linkerResourceLinkerRestClient.CreateListNextPageRequest(nextLink, Id);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new LinkerResource(Client, LinkerResourceData.DeserializeLinkerResourceData(e)), _linkerResourceLinkerClientDiagnostics, Pipeline, "LinkerResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _linkerRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _linkerRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new LinkerResource(Client, LinkerResourceData.DeserializeLinkerResourceData(e)), _linkerClientDiagnostics, Pipeline, "LinkerCollection.GetAll", "value", "nextLink", cancellationToken);
}
///
- /// Returns list of Linkers which connects to the resource.
+ /// Returns list of Linkers which connects to the resource. which supports to config both application and target service during the resource provision.
///
/// -
/// Request Path
@@ -272,7 +272,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cance
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -284,9 +284,9 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cance
/// A collection of that may take multiple service requests to iterate over.
public virtual Pageable GetAll(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => _linkerResourceLinkerRestClient.CreateListRequest(Id);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _linkerResourceLinkerRestClient.CreateListNextPageRequest(nextLink, Id);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new LinkerResource(Client, LinkerResourceData.DeserializeLinkerResourceData(e)), _linkerResourceLinkerClientDiagnostics, Pipeline, "LinkerResourceCollection.GetAll", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _linkerRestClient.CreateListRequest(Id);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _linkerRestClient.CreateListNextPageRequest(nextLink, Id);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new LinkerResource(Client, LinkerResourceData.DeserializeLinkerResourceData(e)), _linkerClientDiagnostics, Pipeline, "LinkerCollection.GetAll", "value", "nextLink", cancellationToken);
}
///
@@ -302,7 +302,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTok
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -318,11 +318,11 @@ public virtual async Task> ExistsAsync(string linkerName, Cancell
{
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.Exists");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.Exists");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.GetAsync(Id, linkerName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _linkerRestClient.GetAsync(Id, linkerName, cancellationToken: cancellationToken).ConfigureAwait(false);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
@@ -345,7 +345,7 @@ public virtual async Task> ExistsAsync(string linkerName, Cancell
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -361,11 +361,11 @@ public virtual Response Exists(string linkerName, CancellationToken cancel
{
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.Exists");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.Exists");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.Get(Id, linkerName, cancellationToken: cancellationToken);
+ var response = _linkerRestClient.Get(Id, linkerName, cancellationToken: cancellationToken);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
@@ -388,7 +388,7 @@ public virtual Response Exists(string linkerName, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -404,11 +404,11 @@ public virtual async Task> GetIfExistsAsync(str
{
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.GetIfExists");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.GetIfExists");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.GetAsync(Id, linkerName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _linkerRestClient.GetAsync(Id, linkerName, cancellationToken: cancellationToken).ConfigureAwait(false);
if (response.Value == null)
return new NoValueResponse(response.GetRawResponse());
return Response.FromValue(new LinkerResource(Client, response.Value), response.GetRawResponse());
@@ -433,7 +433,7 @@ public virtual async Task> GetIfExistsAsync(str
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -449,11 +449,11 @@ public virtual NullableResponse GetIfExists(string linkerName, C
{
Argument.AssertNotNullOrEmpty(linkerName, nameof(linkerName));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResourceCollection.GetIfExists");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerCollection.GetIfExists");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.Get(Id, linkerName, cancellationToken: cancellationToken);
+ var response = _linkerRestClient.Get(Id, linkerName, cancellationToken: cancellationToken);
if (response.Value == null)
return new NoValueResponse(response.GetRawResponse());
return Response.FromValue(new LinkerResource(Client, response.Value), response.GetRawResponse());
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.cs
index 0bdcec9574c4..bbe82df48108 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.cs
@@ -16,10 +16,10 @@
namespace Azure.ResourceManager.ServiceLinker
{
///
- /// A Class representing a LinkerResource along with the instance operations that can be performed on it.
+ /// A Class representing a Linker along with the instance operations that can be performed on it.
/// If you have a you can construct a
/// from an instance of using the GetLinkerResource method.
- /// Otherwise you can get one from its parent resource using the GetLinkerResource method.
+ /// Otherwise you can get one from its parent resource using the GetLinker method.
///
public partial class LinkerResource : ArmResource
{
@@ -32,8 +32,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string resourceUri, st
return new ResourceIdentifier(resourceId);
}
- private readonly ClientDiagnostics _linkerResourceLinkerClientDiagnostics;
- private readonly LinkerRestOperations _linkerResourceLinkerRestClient;
+ private readonly ClientDiagnostics _linkerClientDiagnostics;
+ private readonly LinkerRestOperations _linkerRestClient;
+ private readonly ClientDiagnostics _dryrunLinkersClientDiagnostics;
+ private readonly LinkersRestOperations _dryrunLinkersRestClient;
private readonly LinkerResourceData _data;
/// Gets the resource type for the operations.
@@ -58,9 +60,12 @@ internal LinkerResource(ArmClient client, LinkerResourceData data) : this(client
/// The identifier of the resource that is the target of operations.
internal LinkerResource(ArmClient client, ResourceIdentifier id) : base(client, id)
{
- _linkerResourceLinkerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", ResourceType.Namespace, Diagnostics);
- TryGetApiVersion(ResourceType, out string linkerResourceLinkerApiVersion);
- _linkerResourceLinkerRestClient = new LinkerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, linkerResourceLinkerApiVersion);
+ _linkerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string linkerApiVersion);
+ _linkerRestClient = new LinkerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, linkerApiVersion);
+ _dryrunLinkersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", DryrunResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(DryrunResource.ResourceType, out string dryrunLinkersApiVersion);
+ _dryrunLinkersRestClient = new LinkersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dryrunLinkersApiVersion);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -100,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -111,11 +116,11 @@ internal static void ValidateResourceId(ResourceIdentifier id)
/// The cancellation token to use.
public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Get");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Get");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var response = await _linkerRestClient.GetAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
return Response.FromValue(new LinkerResource(Client, response.Value), response.GetRawResponse());
@@ -140,7 +145,7 @@ public virtual async Task> GetAsync(CancellationToken c
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -151,11 +156,11 @@ public virtual async Task> GetAsync(CancellationToken c
/// The cancellation token to use.
public virtual Response Get(CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Get");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Get");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.Get(Id.Parent, Id.Name, cancellationToken);
+ var response = _linkerRestClient.Get(Id.Parent, Id.Name, cancellationToken);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
return Response.FromValue(new LinkerResource(Client, response.Value), response.GetRawResponse());
@@ -168,7 +173,7 @@ public virtual Response Get(CancellationToken cancellationToken
}
///
- /// Delete a link.
+ /// Delete a Linker.
///
/// -
/// Request Path
@@ -180,7 +185,7 @@ public virtual Response Get(CancellationToken cancellationToken
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -192,12 +197,12 @@ public virtual Response Get(CancellationToken cancellationToken
/// The cancellation token to use.
public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Delete");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Delete");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
- var operation = new ServiceLinkerArmOperation(_linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = await _linkerRestClient.DeleteAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(_linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -210,7 +215,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
}
///
- /// Delete a link.
+ /// Delete a Linker.
///
/// -
/// Request Path
@@ -222,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -234,12 +239,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
/// The cancellation token to use.
public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Delete");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Delete");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
- var operation = new ServiceLinkerArmOperation(_linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = _linkerRestClient.Delete(Id.Parent, Id.Name, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(_linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateDeleteRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletionResponse(cancellationToken);
return operation;
@@ -252,7 +257,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
}
///
- /// Operation to update an existing link.
+ /// Operation to update an existing Linker.
///
/// -
/// Request Path
@@ -264,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -276,16 +281,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
/// Linker details.
/// The cancellation token to use.
/// is null.
- public virtual async Task> UpdateAsync(WaitUntil waitUntil, LinkerResourcePatch patch, CancellationToken cancellationToken = default)
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, LinkerPatch patch, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(patch, nameof(patch));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Update");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Update");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.UpdateAsync(Id.Parent, Id.Name, patch, cancellationToken).ConfigureAwait(false);
- var operation = new ServiceLinkerArmOperation(new LinkerResourceOperationSource(Client), _linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = await _linkerRestClient.UpdateAsync(Id.Parent, Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new LinkerOperationSource(Client), _linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -298,7 +303,7 @@ public virtual async Task> UpdateAsync(WaitUntil wa
}
///
- /// Operation to update an existing link.
+ /// Operation to update an existing Linker.
///
/// -
/// Request Path
@@ -310,7 +315,7 @@ public virtual async Task> UpdateAsync(WaitUntil wa
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -322,16 +327,16 @@ public virtual async Task> UpdateAsync(WaitUntil wa
/// Linker details.
/// The cancellation token to use.
/// is null.
- public virtual ArmOperation Update(WaitUntil waitUntil, LinkerResourcePatch patch, CancellationToken cancellationToken = default)
+ public virtual ArmOperation Update(WaitUntil waitUntil, LinkerPatch patch, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(patch, nameof(patch));
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Update");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Update");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.Update(Id.Parent, Id.Name, patch, cancellationToken);
- var operation = new ServiceLinkerArmOperation(new LinkerResourceOperationSource(Client), _linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = _linkerRestClient.Update(Id.Parent, Id.Name, patch, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new LinkerOperationSource(Client), _linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateUpdateRequest(Id.Parent, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -344,7 +349,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, LinkerRe
}
///
- /// Validate a link.
+ /// Validate a Linker.
///
/// -
/// Request Path
@@ -356,7 +361,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, LinkerRe
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -368,12 +373,12 @@ public virtual ArmOperation Update(WaitUntil waitUntil, LinkerRe
/// The cancellation token to use.
public virtual async Task> ValidateAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Validate");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Validate");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.ValidateAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
- var operation = new ServiceLinkerArmOperation(new LinkerValidateOperationResultOperationSource(), _linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateValidateRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = await _linkerRestClient.ValidateAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new LinkerValidateOperationResultOperationSource(), _linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateValidateRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -386,7 +391,7 @@ public virtual async Task> ValidateA
}
///
- /// Validate a link.
+ /// Validate a Linker.
///
/// -
/// Request Path
@@ -398,7 +403,7 @@ public virtual async Task> ValidateA
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -410,12 +415,12 @@ public virtual async Task> ValidateA
/// The cancellation token to use.
public virtual ArmOperation Validate(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.Validate");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.Validate");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.Validate(Id.Parent, Id.Name, cancellationToken);
- var operation = new ServiceLinkerArmOperation(new LinkerValidateOperationResultOperationSource(), _linkerResourceLinkerClientDiagnostics, Pipeline, _linkerResourceLinkerRestClient.CreateValidateRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = _linkerRestClient.Validate(Id.Parent, Id.Name, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new LinkerValidateOperationResultOperationSource(), _linkerClientDiagnostics, Pipeline, _linkerRestClient.CreateValidateRequest(Id.Parent, Id.Name).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -428,7 +433,7 @@ public virtual ArmOperation Validate(WaitUntil wa
}
///
- /// list source configurations for a linker.
+ /// list source configurations for a Linker.
///
/// -
/// Request Path
@@ -440,7 +445,7 @@ public virtual ArmOperation Validate(WaitUntil wa
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -449,13 +454,13 @@ public virtual ArmOperation Validate(WaitUntil wa
///
///
/// The cancellation token to use.
- public virtual async Task> GetConfigurationsAsync(CancellationToken cancellationToken = default)
+ public virtual async Task> GetConfigurationsAsync(CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.GetConfigurations");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.GetConfigurations");
scope.Start();
try
{
- var response = await _linkerResourceLinkerRestClient.ListConfigurationsAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
+ var response = await _linkerRestClient.ListConfigurationsAsync(Id.Parent, Id.Name, cancellationToken).ConfigureAwait(false);
return response;
}
catch (Exception e)
@@ -466,7 +471,7 @@ public virtual async Task> GetConfigurations
}
///
- /// list source configurations for a linker.
+ /// list source configurations for a Linker.
///
/// -
/// Request Path
@@ -478,7 +483,7 @@ public virtual async Task> GetConfigurations
///
/// -
/// Default Api Version
- /// 2022-05-01
+ /// 2023-04-01-preview
///
/// -
/// Resource
@@ -487,13 +492,91 @@ public virtual async Task> GetConfigurations
///
///
/// The cancellation token to use.
- public virtual Response GetConfigurations(CancellationToken cancellationToken = default)
+ public virtual Response GetConfigurations(CancellationToken cancellationToken = default)
{
- using var scope = _linkerResourceLinkerClientDiagnostics.CreateScope("LinkerResource.GetConfigurations");
+ using var scope = _linkerClientDiagnostics.CreateScope("LinkerResource.GetConfigurations");
scope.Start();
try
{
- var response = _linkerResourceLinkerRestClient.ListConfigurations(Id.Parent, Id.Name, cancellationToken);
+ var response = _linkerRestClient.ListConfigurations(Id.Parent, Id.Name, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Generate configurations for a Linker.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/generateConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GenerateConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Connection Info, including format, secret store, etc.
+ /// The cancellation token to use.
+ public virtual async Task> GenerateConfigurationsAsync(ConfigurationInfo info = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("LinkerResource.GenerateConfigurations");
+ scope.Start();
+ try
+ {
+ var response = await _dryrunLinkersRestClient.GenerateConfigurationsAsync(Id.Parent, Id.Name, info, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Generate configurations for a Linker.
+ ///
+ /// -
+ /// Request Path
+ /// /{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/generateConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Linkers_GenerateConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Connection Info, including format, secret store, etc.
+ /// The cancellation token to use.
+ public virtual Response GenerateConfigurations(ConfigurationInfo info = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _dryrunLinkersClientDiagnostics.CreateScope("LinkerResource.GenerateConfigurations");
+ scope.Start();
+ try
+ {
+ var response = _dryrunLinkersRestClient.GenerateConfigurations(Id.Parent, Id.Name, info, cancellationToken);
return response;
}
catch (Exception e)
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.Serialization.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.Serialization.cs
index 8c18577daae6..b47b8cf0024d 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.Serialization.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.Serialization.cs
@@ -106,6 +106,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
writer.WriteNull("scope");
}
}
+ if (Optional.IsDefined(PublicNetworkSolution))
+ {
+ if (PublicNetworkSolution != null)
+ {
+ writer.WritePropertyName("publicNetworkSolution"u8);
+ writer.WriteObjectValue(PublicNetworkSolution, options);
+ }
+ else
+ {
+ writer.WriteNull("publicNetworkSolution");
+ }
+ }
+ if (Optional.IsDefined(ConfigurationInfo))
+ {
+ if (ConfigurationInfo != null)
+ {
+ writer.WritePropertyName("configurationInfo"u8);
+ writer.WriteObjectValue(ConfigurationInfo, options);
+ }
+ else
+ {
+ writer.WriteNull("configurationInfo");
+ }
+ }
writer.WriteEndObject();
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -156,6 +180,8 @@ internal static LinkerResourceData DeserializeLinkerResourceData(JsonElement ele
VnetSolution vnetSolution = default;
LinkerSecretStore secretStore = default;
string scope = default;
+ PublicNetworkSolution publicNetworkSolution = default;
+ ConfigurationInfo configurationInfo = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -255,6 +281,26 @@ internal static LinkerResourceData DeserializeLinkerResourceData(JsonElement ele
scope = property0.Value.GetString();
continue;
}
+ if (property0.NameEquals("publicNetworkSolution"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ publicNetworkSolution = null;
+ continue;
+ }
+ publicNetworkSolution = PublicNetworkSolution.DeserializePublicNetworkSolution(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("configurationInfo"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ configurationInfo = null;
+ continue;
+ }
+ configurationInfo = ConfigurationInfo.DeserializeConfigurationInfo(property0.Value, options);
+ continue;
+ }
}
continue;
}
@@ -276,6 +322,8 @@ internal static LinkerResourceData DeserializeLinkerResourceData(JsonElement ele
vnetSolution,
secretStore,
scope,
+ publicNetworkSolution,
+ configurationInfo,
serializedAdditionalRawData);
}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.cs
index 8db41809168e..abd2475f1e94 100644
--- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.cs
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResourceData.cs
@@ -64,20 +64,22 @@ public LinkerResourceData()
///
/// The target service properties
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , and .
+ /// The available derived classes include , , and .
///
///
/// The authentication type.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , and .
+ /// The available derived classes include , , , , , , and .
///
/// The application client type.
/// The provisioning state.
/// The VNet solution.
/// An option to store secret value in secure place.
/// connection scope in source service.
+ /// The network solution.
+ /// The connection information consumed by applications, including secrets, connection strings.
/// Keeps track of any properties unknown to the library.
- internal LinkerResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TargetServiceBaseInfo targetService, AuthBaseInfo authInfo, LinkerClientType? clientType, string provisioningState, VnetSolution vnetSolution, LinkerSecretStore secretStore, string scope, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal LinkerResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, TargetServiceBaseInfo targetService, AuthBaseInfo authInfo, LinkerClientType? clientType, string provisioningState, VnetSolution vnetSolution, LinkerSecretStore secretStore, string scope, PublicNetworkSolution publicNetworkSolution, ConfigurationInfo configurationInfo, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
TargetService = targetService;
AuthInfo = authInfo;
@@ -86,19 +88,21 @@ internal LinkerResourceData(ResourceIdentifier id, string name, ResourceType res
VnetSolution = vnetSolution;
SecretStore = secretStore;
Scope = scope;
+ PublicNetworkSolution = publicNetworkSolution;
+ ConfigurationInfo = configurationInfo;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
///
/// The target service properties
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , and .
+ /// The available derived classes include , , and .
///
public TargetServiceBaseInfo TargetService { get; set; }
///
/// The authentication type.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , and .
+ /// The available derived classes include , , , , , , and .
///
public AuthBaseInfo AuthInfo { get; set; }
/// The application client type.
@@ -106,34 +110,14 @@ internal LinkerResourceData(ResourceIdentifier id, string name, ResourceType res
/// The provisioning state.
public string ProvisioningState { get; }
/// The VNet solution.
- internal VnetSolution VnetSolution { get; set; }
- /// Type of VNet solution.
- public VnetSolutionType? SolutionType
- {
- get => VnetSolution is null ? default : VnetSolution.SolutionType;
- set
- {
- if (VnetSolution is null)
- VnetSolution = new VnetSolution();
- VnetSolution.SolutionType = value;
- }
- }
-
+ public VnetSolution VnetSolution { get; set; }
/// An option to store secret value in secure place.
- internal LinkerSecretStore SecretStore { get; set; }
- /// The key vault id to store secret.
- public ResourceIdentifier SecretStoreKeyVaultId
- {
- get => SecretStore is null ? default : SecretStore.KeyVaultId;
- set
- {
- if (SecretStore is null)
- SecretStore = new LinkerSecretStore();
- SecretStore.KeyVaultId = value;
- }
- }
-
+ public LinkerSecretStore SecretStore { get; set; }
/// connection scope in source service.
public string Scope { get; set; }
+ /// The network solution.
+ public PublicNetworkSolution PublicNetworkSolution { get; set; }
+ /// The connection information consumed by applications, including secrets, connection strings.
+ public ConfigurationInfo ConfigurationInfo { get; set; }
}
}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorCollection.cs
new file mode 100644
index 000000000000..3ed7fbb390a0
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorCollection.cs
@@ -0,0 +1,497 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetLocationConnectors method from an instance of .
+ ///
+ public partial class LocationConnectorCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _locationConnectorConnectorClientDiagnostics;
+ private readonly ConnectorRestOperations _locationConnectorConnectorRestClient;
+ private readonly AzureLocation _location;
+
+ /// Initializes a new instance of the class for mocking.
+ protected LocationConnectorCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ /// The name of Azure region.
+ internal LocationConnectorCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id)
+ {
+ _location = location;
+ _locationConnectorConnectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", LocationConnectorResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(LocationConnectorResource.ResourceType, out string locationConnectorConnectorApiVersion);
+ _locationConnectorConnectorRestClient = new ConnectorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, locationConnectorConnectorApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceGroupResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create or update Connector resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of resource.
+ /// Connector details.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string connectorName, LinkerResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new LocationConnectorOperationSource(Client), _locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update Connector resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of resource.
+ /// Connector details.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string connectorName, LinkerResourceData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, data, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new LocationConnectorOperationSource(Client), _locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LocationConnectorResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LocationConnectorResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Returns list of connector which connects to the resource, which supports to config the target service during the resource provision.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _locationConnectorConnectorRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location));
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _locationConnectorConnectorRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location));
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new LocationConnectorResource(Client, LinkerResourceData.DeserializeLinkerResourceData(e)), _locationConnectorConnectorClientDiagnostics, Pipeline, "LocationConnectorCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Returns list of connector which connects to the resource, which supports to config the target service during the resource provision.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _locationConnectorConnectorRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location));
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _locationConnectorConnectorRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location));
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new LocationConnectorResource(Client, LinkerResourceData.DeserializeLinkerResourceData(e)), _locationConnectorConnectorClientDiagnostics, Pipeline, "LocationConnectorCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new LocationConnectorResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string connectorName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(_location), connectorName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new LocationConnectorResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorResource.Serialization.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorResource.Serialization.cs
new file mode 100644
index 000000000000..0046151a883d
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ public partial class LocationConnectorResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ LinkerResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ LinkerResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorResource.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorResource.cs
new file mode 100644
index 000000000000..5d2c759d7d85
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationConnectorResource.cs
@@ -0,0 +1,511 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.ServiceLinker.Models;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ ///
+ /// A Class representing a LocationConnector along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetLocationConnectorResource method.
+ /// Otherwise you can get one from its parent resource using the GetLocationConnector method.
+ ///
+ public partial class LocationConnectorResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The location.
+ /// The connectorName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, AzureLocation location, string connectorName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _locationConnectorConnectorClientDiagnostics;
+ private readonly ConnectorRestOperations _locationConnectorConnectorRestClient;
+ private readonly LinkerResourceData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ServiceLinker/locations/connectors";
+
+ /// Initializes a new instance of the class for mocking.
+ protected LocationConnectorResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal LocationConnectorResource(ArmClient client, LinkerResourceData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal LocationConnectorResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _locationConnectorConnectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string locationConnectorConnectorApiVersion);
+ _locationConnectorConnectorRestClient = new ConnectorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, locationConnectorConnectorApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual LinkerResourceData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LocationConnectorResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Returns Connector resource for a given name.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LocationConnectorResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(_locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(_locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Operation to update an existing Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Connector details.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, LinkerPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, patch, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new LocationConnectorOperationSource(Client), _locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Operation to update an existing Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Connector details.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, LinkerPatch patch, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(patch, nameof(patch));
+
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, patch, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new LocationConnectorOperationSource(Client), _locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Validate a Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/validate
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Validate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task> ValidateAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Validate");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.ValidateAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ServiceLinkerArmOperation(new LinkerValidateOperationResultOperationSource(), _locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateValidateRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Validate a Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/validate
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_Validate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Validate(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.Validate");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.Validate(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken);
+ var operation = new ServiceLinkerArmOperation(new LinkerValidateOperationResultOperationSource(), _locationConnectorConnectorClientDiagnostics, Pipeline, _locationConnectorConnectorRestClient.CreateValidateRequest(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Generate configurations for a Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/generateConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_GenerateConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Connection Info, including format, secret store, etc.
+ /// The cancellation token to use.
+ public virtual async Task> GenerateConfigurationsAsync(ConfigurationInfo info = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.GenerateConfigurations");
+ scope.Start();
+ try
+ {
+ var response = await _locationConnectorConnectorRestClient.GenerateConfigurationsAsync(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, info, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Generate configurations for a Connector.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/generateConfigurations
+ ///
+ /// -
+ /// Operation Id
+ /// Connector_GenerateConfigurations
+ ///
+ /// -
+ /// Default Api Version
+ /// 2023-04-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Connection Info, including format, secret store, etc.
+ /// The cancellation token to use.
+ public virtual Response GenerateConfigurations(ConfigurationInfo info = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _locationConnectorConnectorClientDiagnostics.CreateScope("LocationConnectorResource.GenerateConfigurations");
+ scope.Start();
+ try
+ {
+ var response = _locationConnectorConnectorRestClient.GenerateConfigurations(Id.SubscriptionId, Id.ResourceGroupName, new AzureLocation(Id.Parent.Name), Id.Name, info, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationDryrunCollection.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationDryrunCollection.cs
new file mode 100644
index 000000000000..79963d9c95e5
--- /dev/null
+++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LocationDryrunCollection.cs
@@ -0,0 +1,497 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ServiceLinker
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetLocationDryruns method from an instance of .
+ ///
+ public partial class LocationDryrunCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _locationDryrunConnectorClientDiagnostics;
+ private readonly ConnectorRestOperations _locationDryrunConnectorRestClient;
+ private readonly AzureLocation _location;
+
+ /// Initializes a new instance of the class for mocking.
+ protected LocationDryrunCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ /// The name of Azure region.
+ internal LocationDryrunCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id)
+ {
+ _location = location;
+ _locationDryrunConnectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceLinker", LocationDryrunResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(LocationDryrunResource.ResourceType, out string locationDryrunConnectorApiVersion);
+ _locationDryrunConnectorRestClient = new ConnectorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, locationDryrunConnectorApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceGroupResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// create a dryrun job to do necessary check before actual creation
+ ///
+ ///