diff --git a/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs b/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs
index 8c24ce008a2f..42b47ddad2be 100644
--- a/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs
+++ b/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs
@@ -117,7 +117,7 @@ protected void CleanupResourceGroups()
{
try
{
- _cleanupClient.GetManagementGroupOperations(mgmtGroupId).StartDelete();
+ _cleanupClient.GetManagementGroup(mgmtGroupId).StartDelete();
}
catch (RequestFailedException e) when (e.Status == 404 || e.Status == 403)
{
@@ -206,7 +206,7 @@ public void OneTimeCleanupResourceGroups()
});
Parallel.ForEach(OneTimeManagementGroupCleanupPolicy.ManagementGroupsCreated, mgmtGroupId =>
{
- _cleanupClient.GetManagementGroupOperations(mgmtGroupId).StartDelete();
+ _cleanupClient.GetManagementGroup(mgmtGroupId).StartDelete();
});
}
diff --git a/eng/Directory.Build.Common.props b/eng/Directory.Build.Common.props
index 027407069b52..e8b4c0736351 100644
--- a/eng/Directory.Build.Common.props
+++ b/eng/Directory.Build.Common.props
@@ -126,7 +126,7 @@
-
+
diff --git a/sdk/core/Azure.Core.TestFramework/src/Instrumentation/InstrumentResultInterceptor.cs b/sdk/core/Azure.Core.TestFramework/src/Instrumentation/InstrumentResultInterceptor.cs
index 1c94317d018f..b6d251cbe853 100644
--- a/sdk/core/Azure.Core.TestFramework/src/Instrumentation/InstrumentResultInterceptor.cs
+++ b/sdk/core/Azure.Core.TestFramework/src/Instrumentation/InstrumentResultInterceptor.cs
@@ -30,6 +30,7 @@ public void Intercept(IInvocation invocation)
// We don't want to instrument generated rest clients.
if ((type.Name.EndsWith("Client") && !type.Name.EndsWith("RestClient")) ||
// Generated ARM clients will have a property containing the sub-client that ends with Operations.
+ //TODO: remove after all track2 .net mgmt libraries are updated to the new generation
(invocation.Method.Name.StartsWith("get_") && type.Name.EndsWith("Operations")))
{
if (IsNullResult(invocation))
@@ -41,11 +42,10 @@ public void Intercept(IInvocation invocation)
if (
// Generated ARM clients will have a property containing the sub-client that ends with Operations.
- (invocation.Method.Name.StartsWith("get_") && (type.Name.EndsWith("Operations") || (type.BaseType != null && type.BaseType.Name.EndsWith("Operations")))) ||
+ (invocation.Method.Name.StartsWith("get_") && ManagementInterceptor.InheritsFromArmResource(type)) ||
// Instrument the container construction methods inside Operations objects
- (invocation.Method.Name.StartsWith("Get") && type.Name.EndsWith("Container")) ||
// Instrument the operations construction methods inside Operations objects
- (invocation.Method.Name.StartsWith("Get") && type.Name.EndsWith("Operations")))
+ (invocation.Method.Name.StartsWith("Get") && ManagementInterceptor.InheritsFromArmResource(type)))
{
if (IsNullResult(invocation))
return;
diff --git a/sdk/core/Azure.Core.TestFramework/src/Instrumentation/ManagementInterceptor.cs b/sdk/core/Azure.Core.TestFramework/src/Instrumentation/ManagementInterceptor.cs
index f4ebe0715716..a2a62f34ae70 100644
--- a/sdk/core/Azure.Core.TestFramework/src/Instrumentation/ManagementInterceptor.cs
+++ b/sdk/core/Azure.Core.TestFramework/src/Instrumentation/ManagementInterceptor.cs
@@ -61,7 +61,7 @@ public void Intercept(IInvocation invocation)
}
}
}
- else if (invocation.Method.Name.EndsWith("Value") && type.BaseType.Name.EndsWith("Operations"))
+ else if (invocation.Method.Name.EndsWith("Value") && InheritsFromArmResource(type))
{
invocation.ReturnValue = _testBase.InstrumentClient(type, result, new IInterceptor[] { new ManagementInterceptor(_testBase) });
}
@@ -72,7 +72,7 @@ public void Intercept(IInvocation invocation)
else if (invocation.Method.Name.StartsWith("Get") &&
invocation.Method.Name.EndsWith("Enumerator") &&
type.IsGenericType &&
- InheritsFromOperationBase(type.GetGenericArguments().First()))
+ InheritsFromArmResource(type.GetGenericArguments().First()))
{
var wrapperType = typeof(AsyncPageableInterceptor<>);
var genericType = wrapperType.MakeGenericType(type.GetGenericArguments()[0]);
@@ -81,7 +81,7 @@ public void Intercept(IInvocation invocation)
}
}
- private bool InheritsFromOperationBase(Type elementType)
+ internal static bool InheritsFromArmResource(Type elementType)
{
if (elementType.BaseType == null)
return false;
@@ -89,10 +89,10 @@ private bool InheritsFromOperationBase(Type elementType)
if (elementType.BaseType == typeof(object))
return false;
- if (elementType.BaseType.Name == "ResourceOperations")
+ if (elementType.BaseType.Name == "ArmResource")
return true;
- return InheritsFromOperationBase(elementType.BaseType);
+ return InheritsFromArmResource(elementType.BaseType);
}
private object GetValueFromOther(Type taskResultType, object instrumentedResult)
diff --git a/sdk/core/Azure.Core/tests/ManagementPipelineBuilderTests.cs b/sdk/core/Azure.Core/tests/ManagementPipelineBuilderTests.cs
index d75ebbf99b77..6f812ab87b88 100644
--- a/sdk/core/Azure.Core/tests/ManagementPipelineBuilderTests.cs
+++ b/sdk/core/Azure.Core/tests/ManagementPipelineBuilderTests.cs
@@ -7,14 +7,24 @@
using System.Threading;
using Azure.Core.Pipeline;
using Azure.Core.TestFramework;
+using Azure.Identity;
using Azure.ResourceManager;
using NUnit.Framework;
+using static Azure.Core.Tests.Management.ManagementPipelineBuilderTests;
namespace Azure.Core.Tests.Management
{
- public class ManagementPipelineBuilderTests
+ internal class ManagementPipelineBuilderTests : RecordedTestBase
{
+ internal class MgmtPipelineTestEnvironment : TestEnvironment { }
+
+ public ManagementPipelineBuilderTests(bool isAsync)
+ : base(isAsync)//, RecordedTestMode.Record)
+ {
+ }
+
[TestCase]
+ [SyncOnly]
public void AddPerCallPolicy()
{
var options = new ArmClientOptions();
@@ -27,13 +37,14 @@ public void AddPerCallPolicy()
Assert.IsNotNull(policies.ToArray().FirstOrDefault(p => p.GetType() == typeof(DummyPolicy)));
}
- [TestCase]
+ [RecordedTest]
+ [SyncOnly]
public void AddPerCallPolicyViaClient()
{
- var options = new ArmClientOptions();
+ var options = InstrumentClientOptions(new ArmClientOptions());
var dummyPolicy = new DummyPolicy();
options.AddPolicy(dummyPolicy, HttpPipelinePosition.PerCall);
- var client = new ArmClient(Guid.NewGuid().ToString(), new MockCredential(), options);
+ var client = InstrumentClient(new ArmClient(TestEnvironment.Credential, options));
var pipelineProperty = client.GetType().GetProperty("Pipeline", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.GetProperty);
var pipeline = pipelineProperty.GetValue(client) as HttpPipeline;
diff --git a/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs b/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs
index 4dec3faf2738..2c7a4d742ee8 100644
--- a/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs
+++ b/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs
@@ -48,7 +48,7 @@ public async Task ValidateInstrumentArmOperation()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
var sub = client.DefaultSubscription;
- var operation = (await sub.GetArmOperationAsync()).Value;
+ var operation = (await sub.GetLroAsync()).Value;
var result = operation.Method();
Assert.AreEqual("TestResourceProxy", operation.GetType().Name);
@@ -60,7 +60,7 @@ public async Task ValidateInstrumentArmResponse()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
var sub = client.DefaultSubscription;
- var response = (await sub.GetArmOperationAsync()).Value;
+ var response = (await sub.GetLroAsync()).Value;
var result = response.Method();
Assert.AreEqual("TestResourceProxy", response.GetType().Name);
@@ -83,9 +83,9 @@ public void ValidateInstrumentGetContainer()
public void ValidateInstrumentGetOperations()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- var testResource = client.GetTestResourceOperations();
+ var testResource = client.GetTestResource();
- Assert.AreEqual("TestResourceOperationsProxy", testResource.GetType().Name);
+ Assert.AreEqual("TestResourceProxy", testResource.GetType().Name);
Assert.AreEqual("success", testResource.Method());
}
@@ -105,8 +105,8 @@ public async Task ValidateInstrumentPageable()
public async Task ValidateWaitForCompletion()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
- var testResourceOp = await rgOp.GetArmOperationAsync();
+ TestResource rgOp = client.GetTestResource();
+ var testResourceOp = await rgOp.GetLroAsync();
TestResource testResource = await testResourceOp.WaitForCompletionAsync();
Assert.AreEqual("TestResourceProxy", testResource.GetType().Name);
Assert.AreEqual("success", testResource.Method());
@@ -116,7 +116,7 @@ public async Task ValidateWaitForCompletion()
public void ValidateExceptionResponse()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
+ TestResource rgOp = client.GetTestResource();
Assert.ThrowsAsync(typeof(ArgumentException), async () => await rgOp.GetResponseExceptionAsync());
}
@@ -124,16 +124,16 @@ public void ValidateExceptionResponse()
public void ValidateExceptionOperation()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
- Assert.ThrowsAsync(typeof(ArgumentException), async () => await rgOp.GetArmOperationExceptionAsync());
+ TestResource rgOp = client.GetTestResource();
+ Assert.ThrowsAsync(typeof(ArgumentException), async () => await rgOp.GetLroExceptionAsync());
}
[Test]
public async Task ValidateExceptionOperationWaitForCompletion()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
- var testResourceOp = await rgOp.GetArmOperationAsync(true);
+ TestResource rgOp = client.GetTestResource();
+ var testResourceOp = await rgOp.GetLroAsync(true);
Assert.ThrowsAsync(typeof(ArgumentException), async () => await testResourceOp.WaitForCompletionAsync());
}
@@ -141,7 +141,7 @@ public async Task ValidateExceptionOperationWaitForCompletion()
public async Task ValidateLroWrapper()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
+ TestResource rgOp = client.GetTestResource();
TestResource testResource = await rgOp.LroWrapperAsync();
Assert.AreEqual("TestResourceProxy", testResource.GetType().Name);
Assert.AreEqual("success", testResource.Method());
@@ -151,7 +151,7 @@ public async Task ValidateLroWrapper()
public async Task ValidateStartLroWrapper()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
+ TestResource rgOp = client.GetTestResource();
var testResourceOp = await rgOp.StartLroWrapperAsync();
TestResource testResource = await testResourceOp.WaitForCompletionAsync();
Assert.AreEqual("TestResourceProxy", testResource.GetType().Name);
@@ -162,7 +162,7 @@ public async Task ValidateStartLroWrapper()
public async Task ValidateSkipWait()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
+ TestResource rgOp = client.GetTestResource();
Stopwatch timer = Stopwatch.StartNew();
TestResource testResource = await rgOp.LroWrapperAsync();
timer.Stop();
@@ -174,7 +174,7 @@ public async Task ValidateSkipWait()
public async Task ValidateStartSkipWait()
{
ManagementTestClient client = InstrumentClient(new ManagementTestClient());
- TestResourceOperations rgOp = client.GetTestResourceOperations();
+ TestResource rgOp = client.GetTestResource();
var testResourceOp = await rgOp.StartLroWrapperAsync();
Stopwatch timer = Stopwatch.StartNew();
TestResource testResource = await testResourceOp.WaitForCompletionAsync();
diff --git a/sdk/core/Azure.Core/tests/SessionRecords/ManagementPipelineBuilderTests/AddPerCallPolicyViaClient.json b/sdk/core/Azure.Core/tests/SessionRecords/ManagementPipelineBuilderTests/AddPerCallPolicyViaClient.json
new file mode 100644
index 000000000000..7d7c8dad9d72
--- /dev/null
+++ b/sdk/core/Azure.Core/tests/SessionRecords/ManagementPipelineBuilderTests/AddPerCallPolicyViaClient.json
@@ -0,0 +1,60 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "https://management.azure.com/subscriptions?api-version=2019-11-01",
+ "RequestMethod": "GET",
+ "RequestHeaders": {
+ "Accept": "application/json",
+ "Authorization": "Sanitized",
+ "User-Agent": "azsdk-net-ResourceManager/1.0.0-alpha.20210811.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )",
+ "x-ms-client-request-id": "3f774f37e4a7406de0b4f1abe3dbd7e5",
+ "x-ms-return-client-request-id": "true"
+ },
+ "RequestBody": null,
+ "StatusCode": 200,
+ "ResponseHeaders": {
+ "Cache-Control": "no-cache",
+ "Content-Length": "515",
+ "Content-Type": "application/json; charset=utf-8",
+ "Date": "Wed, 11 Aug 2021 20:07:13 GMT",
+ "Expires": "-1",
+ "Pragma": "no-cache",
+ "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
+ "X-Content-Type-Options": "nosniff",
+ "x-ms-correlation-request-id": "382ecb49-bef5-4d21-84b5-ac8342d3e752",
+ "x-ms-ratelimit-remaining-tenant-reads": "11999",
+ "x-ms-request-id": "382ecb49-bef5-4d21-84b5-ac8342d3e752",
+ "x-ms-routing-request-id": "WESTUS2:20210811T200714Z:382ecb49-bef5-4d21-84b5-ac8342d3e752"
+ },
+ "ResponseBody": {
+ "value": [
+ {
+ "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c",
+ "authorizationSource": "RoleBased",
+ "managedByTenants": [],
+ "tags": {
+ "tagKey1": "tagValue1",
+ "tagKey2": "tagValue2"
+ },
+ "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c",
+ "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
+ "displayName": ".NET Mgmt SDK Test with TTL = 1 Day",
+ "state": "Enabled",
+ "subscriptionPolicies": {
+ "locationPlacementId": "Internal_2014-09-01",
+ "quotaId": "Internal_2014-09-01",
+ "spendingLimit": "Off"
+ }
+ }
+ ],
+ "count": {
+ "type": "Total",
+ "value": 1
+ }
+ }
+ }
+ ],
+ "Variables": {
+ "RandomSeed": "1445225066"
+ }
+}
\ No newline at end of file
diff --git a/sdk/core/Azure.Core/tests/TestClients/ManagementTestClient.cs b/sdk/core/Azure.Core/tests/TestClients/ManagementTestClient.cs
index e61752b2902a..4e04d3f2683b 100644
--- a/sdk/core/Azure.Core/tests/TestClients/ManagementTestClient.cs
+++ b/sdk/core/Azure.Core/tests/TestClients/ManagementTestClient.cs
@@ -19,9 +19,9 @@ public ManagementTestClient(TestClientOptions options)
_diagnostics = new ClientDiagnostics(options);
}
- public virtual TestResourceOperations GetTestResourceOperations()
+ public virtual TestResource GetTestResource()
{
- return new TestResourceOperations();
+ return new TestResource();
}
public virtual TestResourceContainer GetTestResourceContainer()
diff --git a/sdk/core/Azure.Core/tests/TestClients/ArmOperationTest.cs b/sdk/core/Azure.Core/tests/TestClients/TestLroOperation.cs
similarity index 93%
rename from sdk/core/Azure.Core/tests/TestClients/ArmOperationTest.cs
rename to sdk/core/Azure.Core/tests/TestClients/TestLroOperation.cs
index 69e7129ad51f..14c547931c66 100644
--- a/sdk/core/Azure.Core/tests/TestClients/ArmOperationTest.cs
+++ b/sdk/core/Azure.Core/tests/TestClients/TestLroOperation.cs
@@ -8,18 +8,18 @@
namespace Azure.Core.Tests
{
- public class ArmOperationTest : Operation, IOperationSource
+ public class TestLroOperation : Operation, IOperationSource
{
private TestResource _value;
private bool _exceptionOnWait;
private OperationOrResponseInternals _operationHelper;
private int _delaySteps = 0;
- protected ArmOperationTest()
+ protected TestLroOperation()
{
}
- public ArmOperationTest(TestResource value, bool exceptionOnWait = false, int delaySteps = 0)
+ public TestLroOperation(TestResource value, bool exceptionOnWait = false, int delaySteps = 0)
{
_value = value;
_exceptionOnWait = exceptionOnWait;
diff --git a/sdk/core/Azure.Core/tests/TestClients/TestResource.cs b/sdk/core/Azure.Core/tests/TestClients/TestResource.cs
index f7ad212e8fe9..4a4de9033891 100644
--- a/sdk/core/Azure.Core/tests/TestClients/TestResource.cs
+++ b/sdk/core/Azure.Core/tests/TestClients/TestResource.cs
@@ -1,9 +1,293 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core.Pipeline;
+using Azure.Core.TestFramework;
+using Azure.ResourceManager;
+using Azure.ResourceManager.Core;
+
namespace Azure.Core.Tests
{
- public class TestResource : TestResourceOperations
+ public class TestResource : ArmResource
{
+ private DiagnosticScopeFactory _diagnostic = new DiagnosticScopeFactory("Azure.Clients", "Microsoft.Azure.Core.Cool.Tests", true);
+
+ protected override ResourceType ValidResourceType => ResourceIdentifier.RootResourceIdentifier.ResourceType;
+
+ public virtual TestResource GetAnotherOperations()
+ {
+ return new TestResource();
+ }
+
+ public virtual TestLroOperation GetLro(bool exceptionOnWait = false, CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetLro");
+ scope.Start();
+
+ try
+ {
+ return new TestLroOperation(new TestResource(), exceptionOnWait);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual Task GetLroAsync(bool exceptionOnWait = false, CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetLro");
+ scope.Start();
+
+ try
+ {
+ return Task.FromResult(new TestLroOperation(new TestResource(), exceptionOnWait));
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual Response GetResponse(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetResponse");
+ scope.Start();
+
+ try
+ {
+ return Response.FromValue(new TestResource(), new MockResponse(200));
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public async virtual Task> GetResponseAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetResponse");
+ scope.Start();
+
+ try
+ {
+ await Task.Delay(1);
+ return Response.FromValue(new TestResource(), new MockResponse(200));
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual Response GetResponseException(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetResponseException");
+ scope.Start();
+
+ try
+ {
+ throw new ArgumentException("FakeArg");
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual Task> GetResponseExceptionAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetResponseException");
+ scope.Start();
+
+ try
+ {
+ throw new ArgumentException("FakeArg");
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual TestLroOperation GetLroException(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetLroException");
+ scope.Start();
+
+ try
+ {
+ throw new ArgumentException("FakeArg");
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual Task GetLroExceptionAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.GetLroException");
+ scope.Start();
+
+ try
+ {
+ throw new ArgumentException("FakeArg");
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual Response LroWrapper(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.LroWrapper");
+ scope.Start();
+
+ try
+ {
+ var operation = StartLroWrapper(cancellationToken);
+ return operation.WaitForCompletion(cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual TestLroOperation StartLroWrapper(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.StartLroWrapper");
+ scope.Start();
+
+ try
+ {
+ return new TestLroOperation(new TestResource());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual async Task> LroWrapperAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.LroWrapper");
+ scope.Start();
+
+ try
+ {
+ var operation = await StartLroWrapperAsync(cancellationToken);
+ return await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual async Task StartLroWrapperAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.StartLroWrapper");
+ scope.Start();
+
+ try
+ {
+ await Task.Delay(1);
+ return new TestLroOperation(new TestResource());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual Response LongLro(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.LongLro");
+ scope.Start();
+
+ try
+ {
+ var operation = StartLongLro(cancellationToken);
+ return operation.WaitForCompletion(cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public async virtual Task> LongLroAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.LongLro");
+ scope.Start();
+
+ try
+ {
+ var operation = await StartLongLroAsync(cancellationToken);
+ return await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual TestLroOperation StartLongLro(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.StartLongLro");
+ scope.Start();
+
+ try
+ {
+ return new TestLroOperation(new TestResource(), delaySteps: 10);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public async virtual Task StartLongLroAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _diagnostic.CreateScope("TestResource.StartLongLro");
+ scope.Start();
+
+ try
+ {
+ await Task.Delay(1);
+ return new TestLroOperation(new TestResource(), delaySteps: 10);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ public virtual string Method()
+ {
+ return "success";
+ }
}
}
diff --git a/sdk/core/Azure.Core/tests/TestClients/TestResourceContainer.cs b/sdk/core/Azure.Core/tests/TestClients/TestResourceContainer.cs
index eeeed16b3d2a..19c6a5871714 100644
--- a/sdk/core/Azure.Core/tests/TestClients/TestResourceContainer.cs
+++ b/sdk/core/Azure.Core/tests/TestClients/TestResourceContainer.cs
@@ -12,7 +12,7 @@
namespace Azure.Core.Tests
{
- public class TestResourceContainer : ResourceContainer
+ public class TestResourceContainer : ArmContainer
{
private DiagnosticScopeFactory _diagnostic = new DiagnosticScopeFactory("Azure.Clients", "Microsoft.Azure.Core.Cool.Tests", true);
diff --git a/sdk/core/Azure.Core/tests/TestClients/TestResourceOperations.cs b/sdk/core/Azure.Core/tests/TestClients/TestResourceOperations.cs
deleted file mode 100644
index 416a8b8e7475..000000000000
--- a/sdk/core/Azure.Core/tests/TestClients/TestResourceOperations.cs
+++ /dev/null
@@ -1,293 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using Azure.Core.Pipeline;
-using Azure.Core.TestFramework;
-using Azure.ResourceManager;
-using Azure.ResourceManager.Core;
-
-namespace Azure.Core.Tests
-{
- public class TestResourceOperations : ResourceOperations
- {
- private DiagnosticScopeFactory _diagnostic = new DiagnosticScopeFactory("Azure.Clients", "Microsoft.Azure.Core.Cool.Tests", true);
-
- protected override ResourceType ValidResourceType => ResourceIdentifier.RootResourceIdentifier.ResourceType;
-
- public virtual TestResourceOperations GetAnotherOperations()
- {
- return new TestResource();
- }
-
- public virtual ArmOperationTest GetArmOperation(bool exceptionOnWait = false, CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperation");
- scope.Start();
-
- try
- {
- return new ArmOperationTest(new TestResource(), exceptionOnWait);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual Task GetArmOperationAsync(bool exceptionOnWait = false, CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperation");
- scope.Start();
-
- try
- {
- return Task.FromResult(new ArmOperationTest(new TestResource(), exceptionOnWait));
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual Response GetResponse(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetResponse");
- scope.Start();
-
- try
- {
- return Response.FromValue(new TestResource(), new MockResponse(200));
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public async virtual Task> GetResponseAsync(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetResponse");
- scope.Start();
-
- try
- {
- await Task.Delay(1);
- return Response.FromValue(new TestResource(), new MockResponse(200));
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual Response GetResponseException(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetResponseException");
- scope.Start();
-
- try
- {
- throw new ArgumentException("FakeArg");
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual Task> GetResponseExceptionAsync(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetResponseException");
- scope.Start();
-
- try
- {
- throw new ArgumentException("FakeArg");
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual ArmOperationTest GetArmOperationException(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperationException");
- scope.Start();
-
- try
- {
- throw new ArgumentException("FakeArg");
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual Task GetArmOperationExceptionAsync(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperationException");
- scope.Start();
-
- try
- {
- throw new ArgumentException("FakeArg");
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual Response LroWrapper(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.LroWrapper");
- scope.Start();
-
- try
- {
- var operation = StartLroWrapper(cancellationToken);
- return operation.WaitForCompletion(cancellationToken);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual ArmOperationTest StartLroWrapper(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.StartLroWrapper");
- scope.Start();
-
- try
- {
- return new ArmOperationTest(new TestResource());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual async Task> LroWrapperAsync(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.LroWrapper");
- scope.Start();
-
- try
- {
- var operation = await StartLroWrapperAsync(cancellationToken);
- return await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual async Task StartLroWrapperAsync(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.StartLroWrapper");
- scope.Start();
-
- try
- {
- await Task.Delay(1);
- return new ArmOperationTest(new TestResource());
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual Response LongLro(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.LongLro");
- scope.Start();
-
- try
- {
- var operation = StartLongLro(cancellationToken);
- return operation.WaitForCompletion(cancellationToken);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public async virtual Task> LongLroAsync(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.LongLro");
- scope.Start();
-
- try
- {
- var operation = await StartLongLroAsync(cancellationToken);
- return await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual ArmOperationTest StartLongLro(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.StartLongLro");
- scope.Start();
-
- try
- {
- return new ArmOperationTest(new TestResource(), delaySteps: 10);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public async virtual Task StartLongLroAsync(CancellationToken cancellationToken = default)
- {
- using var scope = _diagnostic.CreateScope("TestResourceOperations.StartLongLro");
- scope.Start();
-
- try
- {
- await Task.Delay(1);
- return new ArmOperationTest(new TestResource(), delaySteps: 10);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- public virtual string Method()
- {
- return "success";
- }
- }
-}
diff --git a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs
index 826df671a1a0..70a6ea7112f1 100644
--- a/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs
+++ b/sdk/resourcemanager/Azure.ResourceManager/api/Azure.ResourceManager.netstandard2.0.cs
@@ -20,21 +20,24 @@ public ArmClient(System.Uri baseUri, Azure.Core.TokenCredential credential, Azur
protected virtual Azure.Core.TokenCredential Credential { get { throw null; } }
public virtual Azure.ResourceManager.Resources.Subscription DefaultSubscription { get { throw null; } }
protected virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
- public virtual Azure.ResourceManager.Resources.FeatureOperations GetFeatureOperations(string id) { throw null; }
- public virtual System.Collections.Generic.IReadOnlyList GetGenericResourceOperations(System.Collections.Generic.IEnumerable ids) { throw null; }
- public virtual Azure.ResourceManager.Resources.GenericResourceOperations GetGenericResourceOperations(string id) { throw null; }
- public virtual System.Collections.Generic.IReadOnlyList GetGenericResourceOperations(params string[] ids) { throw null; }
- public virtual Azure.ResourceManager.Management.ManagementGroupOperations GetManagementGroupOperations(string id) { throw null; }
+ public virtual Azure.ResourceManager.Resources.Feature GetFeature(Azure.ResourceManager.ResourceIdentifier id) { throw null; }
+ public virtual Azure.ResourceManager.Resources.GenericResource GetGenericResource(Azure.ResourceManager.ResourceIdentifier id) { throw null; }
+ public virtual System.Collections.Generic.IReadOnlyList GetGenericResources(params Azure.ResourceManager.ResourceIdentifier[] ids) { throw null; }
+ public virtual System.Collections.Generic.IReadOnlyList GetGenericResources(System.Collections.Generic.IEnumerable ids) { throw null; }
+ public virtual System.Collections.Generic.IReadOnlyList GetGenericResources(System.Collections.Generic.IEnumerable ids) { throw null; }
+ public virtual System.Collections.Generic.IReadOnlyList GetGenericResources(params string[] ids) { throw null; }
+ public virtual Azure.ResourceManager.Management.ManagementGroup GetManagementGroup(Azure.ResourceManager.ResourceIdentifier id) { throw null; }
public virtual Azure.ResourceManager.Management.ManagementGroupContainer GetManagementGroups() { throw null; }
- public virtual Azure.Response GetProvider(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetProviderAsync(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.ProviderOperations GetProviderOperations(string id) { throw null; }
- public virtual Azure.Pageable GetProviders(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetProvidersAsync(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.ResourceGroupOperations GetResourceGroupOperations(string id) { throw null; }
+ public virtual Azure.ResourceManager.Resources.PredefinedTag GetPreDefinedTag(Azure.ResourceManager.ResourceIdentifier id) { throw null; }
+ public virtual Azure.ResourceManager.Resources.Provider GetProvider(Azure.ResourceManager.ResourceIdentifier id) { throw null; }
+ public virtual Azure.ResourceManager.Resources.ResourceGroup GetResourceGroup(Azure.ResourceManager.ResourceIdentifier id) { throw null; }
public virtual Azure.ResourceManager.Resources.RestApiContainer GetRestApis(string azureNamespace) { throw null; }
- public virtual Azure.ResourceManager.Resources.SubscriptionOperations GetSubscriptionOperations(string id) { throw null; }
+ public virtual Azure.ResourceManager.Resources.Subscription GetSubscription(Azure.ResourceManager.ResourceIdentifier id) { throw null; }
public virtual Azure.ResourceManager.Resources.SubscriptionContainer GetSubscriptions() { throw null; }
+ public virtual Azure.Response GetTenantProvider(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetTenantProviderAsync(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetTenantProviders(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetTenantProvidersAsync(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.ResourceManager.Resources.TenantContainer GetTenants() { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public virtual T UseClientContext(System.Func func) { throw null; }
@@ -160,23 +163,39 @@ public ResourceTypeFilter(Azure.ResourceManager.ResourceType resourceType) { }
}
namespace Azure.ResourceManager.Core
{
- public abstract partial class ResourceContainer : Azure.ResourceManager.Core.ResourceOperations
+ public abstract partial class ArmContainer : Azure.ResourceManager.Core.ArmResource
{
- protected ResourceContainer() { }
- protected ResourceContainer(Azure.ResourceManager.ArmClientOptions options, Azure.Core.TokenCredential credential, System.Uri baseUri, Azure.Core.Pipeline.HttpPipeline pipeline) { }
- protected ResourceContainer(Azure.ResourceManager.Core.ResourceOperations parent) { }
- protected Azure.ResourceManager.Core.ResourceOperations Parent { get { throw null; } }
+ protected ArmContainer() { }
+ protected ArmContainer(Azure.ResourceManager.ArmClientOptions options, Azure.Core.TokenCredential credential, System.Uri baseUri, Azure.Core.Pipeline.HttpPipeline pipeline) { }
+ protected ArmContainer(Azure.ResourceManager.Core.ArmResource parent) { }
+ protected Azure.ResourceManager.Core.ArmResource Parent { get { throw null; } }
+ }
+ public abstract partial class ArmResource
+ {
+ protected ArmResource() { }
+ protected ArmResource(Azure.ResourceManager.Core.ArmResource parentOperations, Azure.ResourceManager.ResourceIdentifier id) { }
+ protected internal virtual System.Uri BaseUri { get { throw null; } }
+ protected internal virtual Azure.ResourceManager.ArmClientOptions ClientOptions { get { throw null; } }
+ protected internal virtual Azure.Core.TokenCredential Credential { get { throw null; } }
+ public virtual Azure.ResourceManager.ResourceIdentifier Id { get { throw null; } }
+ protected internal virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
+ protected internal Azure.ResourceManager.Resources.TagResourceContainer TagContainer { get { throw null; } }
+ protected internal Azure.ResourceManager.Resources.TagResource TagResourceOperations { get { throw null; } }
+ protected abstract Azure.ResourceManager.ResourceType ValidResourceType { get; }
+ protected System.Collections.Generic.IEnumerable ListAvailableLocations(Azure.ResourceManager.ResourceType resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ protected System.Threading.Tasks.Task> ListAvailableLocationsAsync(Azure.ResourceManager.ResourceType resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ protected virtual void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
}
public static partial class ResourceListOperations
{
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public static Azure.Pageable GetAtContext(Azure.ResourceManager.Resources.ResourceGroupOperations resourceGroup, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.Pageable GetAtContext(Azure.ResourceManager.Resources.ResourceGroup resourceGroup, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public static Azure.Pageable GetAtContext(Azure.ResourceManager.Resources.SubscriptionOperations subscription, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.Pageable GetAtContext(Azure.ResourceManager.Resources.Subscription subscription, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public static Azure.AsyncPageable GetAtContextAsync(Azure.ResourceManager.Resources.ResourceGroupOperations resourceGroup, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.AsyncPageable GetAtContextAsync(Azure.ResourceManager.Resources.ResourceGroup resourceGroup, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public static Azure.AsyncPageable GetAtContextAsync(Azure.ResourceManager.Resources.SubscriptionOperations subscription, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.AsyncPageable GetAtContextAsync(Azure.ResourceManager.Resources.Subscription subscription, Azure.ResourceManager.ResourceFilterCollection resourceFilters = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
public static partial class ResourceManagerExtensions
{
@@ -190,40 +209,32 @@ public static partial class ResourceManagerExtensions
public static Azure.Response WaitForCompletion(this Azure.Operation operation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public static Azure.Response WaitForCompletion(this Azure.Operation operation, System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
- public abstract partial class ResourceOperations
- {
- protected ResourceOperations() { }
- protected ResourceOperations(Azure.ResourceManager.Core.ResourceOperations parentOperations, Azure.ResourceManager.ResourceIdentifier id) { }
- protected internal virtual System.Uri BaseUri { get { throw null; } }
- protected internal virtual Azure.ResourceManager.ArmClientOptions ClientOptions { get { throw null; } }
- protected internal virtual Azure.Core.TokenCredential Credential { get { throw null; } }
- public virtual Azure.ResourceManager.ResourceIdentifier Id { get { throw null; } }
- protected internal virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } }
- protected internal Azure.ResourceManager.Resources.TagResourceContainer TagContainer { get { throw null; } }
- protected internal Azure.ResourceManager.Resources.TagResourceOperations TagResourceOperations { get { throw null; } }
- protected abstract Azure.ResourceManager.ResourceType ValidResourceType { get; }
- protected System.Collections.Generic.IEnumerable ListAvailableLocations(Azure.ResourceManager.ResourceType resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- protected System.Threading.Tasks.Task> ListAvailableLocationsAsync(Azure.ResourceManager.ResourceType resourceType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- protected virtual void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
- }
- public abstract partial class SingletonOperations : Azure.ResourceManager.Core.ResourceOperations
- {
- protected SingletonOperations() { }
- protected SingletonOperations(Azure.ResourceManager.Core.ResourceOperations parent) { }
- protected Azure.ResourceManager.Core.ResourceOperations Parent { get { throw null; } }
- }
}
namespace Azure.ResourceManager.Management
{
- public partial class ManagementGroup : Azure.ResourceManager.Management.ManagementGroupOperations
+ public partial class ManagementGroup : Azure.ResourceManager.Core.ArmResource
{
+ public static readonly Azure.ResourceManager.ResourceType ResourceType;
protected ManagementGroup() { }
+ protected internal ManagementGroup(Azure.ResourceManager.Core.ArmResource options, Azure.ResourceManager.ResourceIdentifier id) { }
public virtual Azure.ResourceManager.Management.ManagementGroupData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.Response Delete(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetDescendants(string skiptoken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetDescendantsAsync(string skiptoken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Management.Models.ManagementGroupDeleteOperation StartDelete(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task StartDeleteAsync(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Update(Azure.ResourceManager.Management.Models.PatchManagementGroupOptions patchGroupOptions, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Management.Models.PatchManagementGroupOptions patchGroupOptions, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
- public partial class ManagementGroupContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class ManagementGroupContainer : Azure.ResourceManager.Core.ArmContainer
{
protected ManagementGroupContainer() { }
- protected new Azure.ResourceManager.Resources.TenantOperations Parent { get { throw null; } }
+ protected new Azure.ResourceManager.Resources.Tenant Parent { get { throw null; } }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
public virtual Azure.Response CheckIfExists(string groupId, Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> CheckIfExistsAsync(string groupId, Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -232,8 +243,8 @@ protected ManagementGroupContainer() { }
public virtual Azure.Response CreateOrUpdate(string groupId, Azure.ResourceManager.Management.Models.CreateManagementGroupOptions createManagementGroupOptions, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string groupId, Azure.ResourceManager.Management.Models.CreateManagementGroupOptions createManagementGroupOptions, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response Get(string groupId, Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetAll(string cacheControl = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetAllAsync(string cacheControl = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(string cacheControl = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(string cacheControl = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetAsync(string groupId, Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response GetIfExists(string groupId, Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string groupId, Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -248,34 +259,6 @@ internal ManagementGroupData() { }
public string DisplayName { get { throw null; } }
public string TenantId { get { throw null; } }
}
- public partial class ManagementGroupInfo : Azure.ResourceManager.Management.ManagementGroupOperations
- {
- protected ManagementGroupInfo() { }
- public virtual Azure.ResourceManager.Management.ManagementGroupInfoData Data { get { throw null; } }
- }
- public partial class ManagementGroupInfoData : Azure.ResourceManager.Resources.Models.Resource
- {
- internal ManagementGroupInfoData() { }
- public string DisplayName { get { throw null; } }
- public string TenantId { get { throw null; } }
- }
- public partial class ManagementGroupOperations : Azure.ResourceManager.Core.ResourceOperations
- {
- public static readonly Azure.ResourceManager.ResourceType ResourceType;
- protected ManagementGroupOperations() { }
- protected internal ManagementGroupOperations(Azure.ResourceManager.Core.ResourceOperations options, Azure.ResourceManager.ResourceIdentifier id) { }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response Delete(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task DeleteAsync(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Get(Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.Management.Models.ManagementGroupExpandType? expand = default(Azure.ResourceManager.Management.Models.ManagementGroupExpandType?), bool? recurse = default(bool?), string filter = null, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetDescendants(string skiptoken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetDescendantsAsync(string skiptoken = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Management.Models.ManagementGroupDeleteOperation StartDelete(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task StartDeleteAsync(string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Update(Azure.ResourceManager.Management.Models.PatchManagementGroupOptions patchGroupOptions, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Management.Models.PatchManagementGroupOptions patchGroupOptions, string cacheControl = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- }
}
namespace Azure.ResourceManager.Management.Models
{
@@ -449,15 +432,25 @@ public enum Reason
}
namespace Azure.ResourceManager.Resources
{
- public partial class Feature : Azure.ResourceManager.Resources.FeatureOperations
+ public partial class Feature : Azure.ResourceManager.Core.ArmResource
{
+ public static readonly Azure.ResourceManager.ResourceType ResourceType;
protected Feature() { }
public virtual Azure.ResourceManager.Resources.FeatureData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Register(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> RegisterAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Unregister(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UnregisterAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ protected override void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
}
- public partial class FeatureContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class FeatureContainer : Azure.ResourceManager.Core.ArmContainer
{
protected FeatureContainer() { }
- protected new Azure.ResourceManager.Resources.ProviderOperations Parent { get { throw null; } }
+ protected new Azure.ResourceManager.Resources.Provider Parent { get { throw null; } }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
public virtual Azure.Response CheckIfExists(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> CheckIfExistsAsync(string featureName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -473,26 +466,31 @@ public partial class FeatureData : Azure.ResourceManager.Resources.Models.Resour
internal FeatureData() { }
public Azure.ResourceManager.Resources.Models.FeatureProperties Properties { get { throw null; } }
}
- public partial class FeatureOperations : Azure.ResourceManager.Core.ResourceOperations
- {
- public static readonly Azure.ResourceManager.ResourceType ResourceType;
- protected FeatureOperations() { }
- protected FeatureOperations(Azure.ResourceManager.Core.ResourceOperations options, Azure.ResourceManager.ResourceIdentifier id) { }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Register(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> RegisterAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Unregister(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> UnregisterAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- protected override void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
- }
- public partial class GenericResource : Azure.ResourceManager.Resources.GenericResourceOperations
+ public partial class GenericResource : Azure.ResourceManager.Core.ArmResource
{
protected GenericResource() { }
public virtual Azure.ResourceManager.Resources.GenericResourceData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Delete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Resources.Models.ResourceDeleteByIdOperation StartDelete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task StartDeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Resources.Models.ResourceUpdateByIdOperation StartUpdate(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task StartUpdateAsync(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Update(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ protected override void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
}
- public partial class GenericResourceContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class GenericResourceContainer : Azure.ResourceManager.Core.ArmContainer
{
protected GenericResourceContainer() { }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
@@ -501,11 +499,11 @@ protected GenericResourceContainer() { }
public virtual Azure.Response CreateOrUpdate(string resourceId, Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string resourceId, Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public Azure.Response Get(string resourceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetAll(string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetAsync(string resourceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetByResourceGroup(string resourceGroupName, string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetByResourceGroupAsync(string resourceGroupName, string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetByResourceGroup(string resourceGroupName, string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetByResourceGroupAsync(string resourceGroupName, string filter = null, string expand = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response GetIfExists(string resourceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string resourceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.ResourceManager.Resources.Models.ResourceCreateOrUpdateByIdOperation StartCreateOrUpdate(string resourceId, Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -515,53 +513,34 @@ protected override void ValidateResourceType(Azure.ResourceManager.ResourceIdent
public partial class GenericResourceData : Azure.ResourceManager.Resources.Models.TrackedResource
{
public GenericResourceData() { }
+ public System.DateTimeOffset? ChangedTime { get { throw null; } }
+ public System.DateTimeOffset? CreatedTime { get { throw null; } }
public Azure.ResourceManager.Resources.Models.ResourceIdentity Identity { get { throw null; } set { } }
public string Kind { get { throw null; } set { } }
public string ManagedBy { get { throw null; } set { } }
public Azure.ResourceManager.Resources.Models.Plan Plan { get { throw null; } set { } }
public object Properties { get { throw null; } set { } }
- public Azure.ResourceManager.Resources.Models.Sku Sku { get { throw null; } set { } }
- }
- public partial class GenericResourceExpanded : Azure.ResourceManager.Resources.GenericResourceOperations
- {
- protected GenericResourceExpanded() { }
- public virtual Azure.ResourceManager.Resources.GenericResourceExpandedData Data { get { throw null; } }
- }
- public partial class GenericResourceExpandedData : Azure.ResourceManager.Resources.GenericResourceData
- {
- public GenericResourceExpandedData() { }
- public System.DateTimeOffset? ChangedTime { get { throw null; } }
- public System.DateTimeOffset? CreatedTime { get { throw null; } }
public string ProvisioningState { get { throw null; } }
+ public Azure.ResourceManager.Resources.Models.Sku Sku { get { throw null; } set { } }
}
- public partial class GenericResourceOperations : Azure.ResourceManager.Core.ResourceOperations
- {
- protected GenericResourceOperations() { }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Delete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task DeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.Models.ResourceDeleteByIdOperation StartDelete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task StartDeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.Models.ResourceUpdateByIdOperation StartUpdate(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task StartUpdateAsync(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Update(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Resources.GenericResourceData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- protected override void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
- }
- public partial class PredefinedTag : Azure.ResourceManager.Resources.PredefinedTagOperations
+ public partial class PredefinedTag : Azure.ResourceManager.Core.ArmResource
{
+ public static readonly Azure.ResourceManager.ResourceType ResourceType;
protected PredefinedTag() { }
public virtual Azure.ResourceManager.Resources.PredefinedTagData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.Response CreateOrUpdateValue(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CreateOrUpdateValueAsync(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Delete(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response DeleteValue(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteValueAsync(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Resources.Models.PredefinedTagDeleteOperation StartDelete(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task StartDeleteAsync(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ protected override void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
}
- public partial class PredefinedTagContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class PredefinedTagContainer : Azure.ResourceManager.Core.ArmContainer
{
protected PredefinedTagContainer() { }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
@@ -579,27 +558,22 @@ internal PredefinedTagData() { }
public string TagName { get { throw null; } }
public System.Collections.Generic.IReadOnlyList Values { get { throw null; } }
}
- public partial class PredefinedTagOperations : Azure.ResourceManager.Core.ResourceOperations
+ public partial class Provider : Azure.ResourceManager.Core.ArmResource
{
public static readonly Azure.ResourceManager.ResourceType ResourceType;
- protected PredefinedTagOperations() { }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response CreateOrUpdateValue(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> CreateOrUpdateValueAsync(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Delete(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task DeleteAsync(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response DeleteValue(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task DeleteValueAsync(string tagName, string tagValue, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.Models.PredefinedTagDeleteOperation StartDelete(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task StartDeleteAsync(string tagName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- protected override void ValidateResourceType(Azure.ResourceManager.ResourceIdentifier identifier) { }
- }
- public partial class Provider : Azure.ResourceManager.Resources.ProviderOperations
- {
protected Provider() { }
public virtual Azure.ResourceManager.Resources.ProviderData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Resources.FeatureContainer GetFeatures() { throw null; }
+ public virtual Azure.Response Register(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> RegisterAsync(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Unregister(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UnregisterAsync(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
- public partial class ProviderContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class ProviderContainer : Azure.ResourceManager.Core.ArmContainer
{
protected ProviderContainer() { }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
@@ -620,54 +594,12 @@ internal ProviderData() { }
public string RegistrationState { get { throw null; } }
public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } }
}
- public partial class ProviderOperations : Azure.ResourceManager.Core.ResourceOperations
+ public partial class ResourceGroup : Azure.ResourceManager.Core.ArmResource
{
public static readonly Azure.ResourceManager.ResourceType ResourceType;
- protected ProviderOperations() { }
- protected ProviderOperations(Azure.ResourceManager.Core.ResourceOperations operations, Azure.ResourceManager.ResourceIdentifier id) { }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.FeatureContainer GetFeatures() { throw null; }
- public virtual Azure.Response Register(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> RegisterAsync(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Unregister(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> UnregisterAsync(string resourceProviderNamespace, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- }
- public partial class ResourceGroup : Azure.ResourceManager.Resources.ResourceGroupOperations
- {
protected ResourceGroup() { }
public virtual Azure.ResourceManager.Resources.ResourceGroupData Data { get { throw null; } }
- }
- public partial class ResourceGroupContainer : Azure.ResourceManager.Core.ResourceContainer
- {
- protected ResourceGroupContainer() { }
- protected new Azure.ResourceManager.Resources.SubscriptionOperations Parent { get { throw null; } }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response CheckIfExists(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> CheckIfExistsAsync(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public Azure.Response CreateOrUpdate(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public Azure.Response Get(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response GetIfExists(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public Azure.ResourceManager.Resources.Models.ResourceGroupCreateOrUpdateOperation StartCreateOrUpdate(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task StartCreateOrUpdateAsync(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- }
- public partial class ResourceGroupData : Azure.ResourceManager.Resources.Models.TrackedResource
- {
- public ResourceGroupData(string location) { }
- public string ManagedBy { get { throw null; } set { } }
- public Azure.ResourceManager.Resources.Models.ResourceGroupProperties Properties { get { throw null; } set { } }
- }
- public partial class ResourceGroupOperations : Azure.ResourceManager.Core.ResourceOperations
- {
- public static readonly Azure.ResourceManager.ResourceType ResourceType;
- protected ResourceGroupOperations() { }
- protected ResourceGroupOperations(Azure.ResourceManager.Core.ResourceOperations options, Azure.ResourceManager.ResourceIdentifier id) { }
+ public bool HasData { get { throw null; } }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -698,22 +630,61 @@ protected ResourceGroupOperations(Azure.ResourceManager.Core.ResourceOperations
public virtual Azure.Response ValidateMoveResources(Azure.ResourceManager.Resources.Models.ResourcesMoveInfo parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task ValidateMoveResourcesAsync(Azure.ResourceManager.Resources.Models.ResourcesMoveInfo parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
- public partial class RestApiContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class ResourceGroupContainer : Azure.ResourceManager.Core.ArmContainer
+ {
+ protected ResourceGroupContainer() { }
+ protected new Azure.ResourceManager.Resources.Subscription Parent { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.Response CheckIfExists(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CheckIfExistsAsync(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public Azure.Response CreateOrUpdate(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public Azure.Response Get(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(string filter = null, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response GetIfExists(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string resourceGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public Azure.ResourceManager.Resources.Models.ResourceGroupCreateOrUpdateOperation StartCreateOrUpdate(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task StartCreateOrUpdateAsync(string name, Azure.ResourceManager.Resources.ResourceGroupData resourceDetails, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class ResourceGroupData : Azure.ResourceManager.Resources.Models.TrackedResource
+ {
+ public ResourceGroupData(string location) { }
+ public string ManagedBy { get { throw null; } set { } }
+ public Azure.ResourceManager.Resources.Models.ResourceGroupProperties Properties { get { throw null; } set { } }
+ }
+ public partial class RestApiContainer : Azure.ResourceManager.Core.ArmContainer
{
protected RestApiContainer() { }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
- public partial class Subscription : Azure.ResourceManager.Resources.SubscriptionOperations
+ public partial class Subscription : Azure.ResourceManager.Core.ArmResource
{
+ public static readonly Azure.ResourceManager.ResourceType ResourceType;
protected Subscription() { }
public virtual Azure.ResourceManager.Resources.SubscriptionData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetFeatures(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetFeaturesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Resources.GenericResourceContainer GetGenericResources() { throw null; }
+ public virtual Azure.Pageable GetLocations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetLocationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Resources.PredefinedTagContainer GetPredefinedTags() { throw null; }
+ public virtual Azure.ResourceManager.Resources.ProviderContainer GetProviders() { throw null; }
+ public virtual Azure.ResourceManager.Resources.ResourceGroupContainer GetResourceGroups() { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public virtual T UseClientContext(System.Func func) { throw null; }
}
- public partial class SubscriptionContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class SubscriptionContainer : Azure.ResourceManager.Core.ArmContainer
{
protected SubscriptionContainer() { }
- protected new Azure.ResourceManager.Resources.TenantOperations Parent { get { throw null; } }
+ protected new Azure.ResourceManager.Resources.Tenant Parent { get { throw null; } }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
public virtual Azure.Response CheckIfExists(string subscriptionGuid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task> CheckIfExistsAsync(string subscriptionGuid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -736,32 +707,24 @@ internal SubscriptionData() { }
public Azure.ResourceManager.Resources.Models.SubscriptionPolicies SubscriptionPolicies { get { throw null; } }
public string TenantId { get { throw null; } }
}
- public partial class SubscriptionOperations : Azure.ResourceManager.Core.ResourceOperations
+ public partial class TagResource : Azure.ResourceManager.Core.ArmResource
{
- public static readonly Azure.ResourceManager.ResourceType ResourceType;
- protected SubscriptionOperations() { }
- protected SubscriptionOperations(Azure.ResourceManager.Core.ResourceOperations operations, Azure.ResourceManager.ResourceIdentifier id) { }
+ protected TagResource() { }
+ public virtual Azure.ResourceManager.Resources.TagResourceData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetFeatures(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetFeaturesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.GenericResourceContainer GetGenericResources() { throw null; }
- public virtual Azure.Pageable GetLocations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetLocationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.PredefinedTagOperations GetPreDefinedTagOperations() { throw null; }
- public virtual Azure.ResourceManager.Resources.PredefinedTagContainer GetPredefinedTags() { throw null; }
- public virtual Azure.ResourceManager.Resources.ProviderContainer GetProviders() { throw null; }
- public virtual Azure.ResourceManager.Resources.ResourceGroupContainer GetResourceGroups() { throw null; }
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public virtual T UseClientContext(System.Func func) { throw null; }
- }
- public partial class TagResource : Azure.ResourceManager.Resources.TagResourceOperations
- {
- internal TagResource() { }
- public Azure.ResourceManager.Resources.TagResourceData Data { get { throw null; } }
+ public virtual Azure.Response Delete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response StartDelete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task StartDeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Resources.Models.TagCreateOrUpdateOperation StartUpdate(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task StartUpdateAsync(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Update(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
- public partial class TagResourceContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class TagResourceContainer : Azure.ResourceManager.Core.ArmContainer
{
protected TagResourceContainer() { }
public new Azure.ResourceManager.ResourceIdentifier Id { get { throw null; } }
@@ -776,28 +739,23 @@ public partial class TagResourceData : Azure.ResourceManager.Resources.Models.Re
public TagResourceData(Azure.ResourceManager.Resources.Models.Tag properties) { }
public Azure.ResourceManager.Resources.Models.Tag Properties { get { throw null; } set { } }
}
- public partial class TagResourceOperations : Azure.ResourceManager.Core.ResourceOperations
- {
- protected TagResourceOperations() { }
- public new Azure.ResourceManager.ResourceIdentifier Id { get { throw null; } }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.Response Delete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task DeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response StartDelete(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task StartDeleteAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.Models.TagCreateOrUpdateOperation StartUpdate(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task StartUpdateAsync(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Response Update(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Resources.Models.TagPatchResource parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- }
- public partial class Tenant : Azure.ResourceManager.Resources.TenantOperations
+ public partial class Tenant : Azure.ResourceManager.Core.ArmResource
{
+ public static readonly Azure.ResourceManager.ResourceType ResourceType;
protected Tenant() { }
public virtual Azure.ResourceManager.Resources.TenantData Data { get { throw null; } }
+ public bool HasData { get { throw null; } }
+ protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
+ public virtual Azure.ResourceManager.Management.ManagementGroupContainer GetManagementGroups() { throw null; }
+ public virtual Azure.ResourceManager.Resources.SubscriptionContainer GetSubscriptions() { throw null; }
+ public virtual Azure.Response GetTenantProvider(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetTenantProviderAsync(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetTenantProviders(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetTenantProvidersAsync(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public virtual T UseClientContext(System.Func func) { throw null; }
}
- public partial class TenantContainer : Azure.ResourceManager.Core.ResourceContainer
+ public partial class TenantContainer : Azure.ResourceManager.Core.ArmContainer
{
protected TenantContainer() { }
protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
@@ -815,20 +773,6 @@ internal TenantData() { }
public Azure.ResourceManager.Resources.Models.TenantCategory? TenantCategory { get { throw null; } }
public string TenantId { get { throw null; } }
}
- public partial class TenantOperations : Azure.ResourceManager.Core.ResourceOperations
- {
- public static readonly Azure.ResourceManager.ResourceType ResourceType;
- protected TenantOperations() { }
- protected override Azure.ResourceManager.ResourceType ValidResourceType { get { throw null; } }
- public virtual Azure.ResourceManager.Management.ManagementGroupContainer GetManagementGroups() { throw null; }
- public virtual Azure.Response GetProvider(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual System.Threading.Tasks.Task> GetProviderAsync(string resourceProviderNamespace, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.Pageable GetProviders(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.AsyncPageable GetProvidersAsync(int? top = default(int?), string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public virtual Azure.ResourceManager.Resources.SubscriptionContainer GetSubscriptions() { throw null; }
- [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
- public virtual T UseClientContext(System.Func func) { throw null; }
- }
}
namespace Azure.ResourceManager.Resources.Models
{
diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/ArmClient.cs b/sdk/resourcemanager/Azure.ResourceManager/src/ArmClient.cs
index ad0928e30906..f0376e1e4119 100644
--- a/sdk/resourcemanager/Azure.ResourceManager/src/ArmClient.cs
+++ b/sdk/resourcemanager/Azure.ResourceManager/src/ArmClient.cs
@@ -25,7 +25,7 @@ public class ArmClient
/// The base URI of the service.
///
internal const string DefaultUri = "https://management.azure.com";
- private TenantOperations _tenant;
+ private Tenant _tenant;
///
/// Initializes a new instance of the class for mocking.
@@ -104,12 +104,12 @@ public ArmClient(
Credential = credential;
BaseUri = baseUri ?? new Uri(DefaultUri);
ClientOptions = options?.Clone() ?? new ArmClientOptions();
- Pipeline = ManagementPipelineBuilder.Build(Credential, options.Scope, options ?? ClientOptions);
+ Pipeline = ManagementPipelineBuilder.Build(Credential, ClientOptions.Scope, options ?? ClientOptions);
- _tenant = new TenantOperations(ClientOptions, Credential, BaseUri, Pipeline);
+ _tenant = new Tenant(ClientOptions, Credential, BaseUri, Pipeline);
DefaultSubscription = string.IsNullOrWhiteSpace(defaultSubscriptionId)
? GetDefaultSubscription()
- : GetSubscriptions().GetIfExists(defaultSubscriptionId);
+ : GetSubscriptions().Get(defaultSubscriptionId);
ClientOptions.ApiVersions.SetProviderClient(this);
}
@@ -157,10 +157,10 @@ public virtual TenantContainer GetTenants()
/// Gets a resource group operations object.
///
/// The id of the resourcegroup.
- /// Resource operations of the resource.
- public virtual ResourceGroupOperations GetResourceGroupOperations(string id)
+ /// Resource operations of the resourcegroup.
+ public virtual ResourceGroup GetResourceGroup(ResourceIdentifier id)
{
- return new ResourceGroupOperations(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
+ return new ResourceGroup(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
}
///
@@ -168,9 +168,9 @@ public virtual ResourceGroupOperations GetResourceGroupOperations(string id)
///
/// The id of the subscription.
/// Resource operations of the subscription.
- public virtual SubscriptionOperations GetSubscriptionOperations(string id)
+ public virtual Subscription GetSubscription(ResourceIdentifier id)
{
- return new SubscriptionOperations(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
+ return new Subscription(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
}
///
@@ -178,19 +178,29 @@ public virtual SubscriptionOperations GetSubscriptionOperations(string id)
///
/// The id of the feature.
/// Resource operations of the feature.
- public virtual FeatureOperations GetFeatureOperations(string id)
+ public virtual Feature GetFeature(ResourceIdentifier id)
{
- return new FeatureOperations(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
+ return new Feature(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
}
///
- /// Gets a feature operations object.
+ /// Gets a Provider operations object.
///
- /// The id of the feature.
- /// Resource operations of the feature.
- public virtual ProviderOperations GetProviderOperations(string id)
+ /// The id of the Provider.
+ /// Resource operations of the Provider.
+ public virtual Provider GetProvider(ResourceIdentifier id)
+ {
+ return new Provider(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
+ }
+
+ ///
+ /// Gets a PredefinedTag operations object.
+ ///
+ /// The id of the PredefinedTag.
+ /// Resource operations of the PredefinedTag.
+ public virtual PredefinedTag GetPreDefinedTag(ResourceIdentifier id)
{
- return new ProviderOperations(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
+ return new PredefinedTag(new ClientContext(ClientOptions, Credential, BaseUri, Pipeline), id);
}
private Subscription GetDefaultSubscription()
@@ -219,7 +229,7 @@ public virtual T UseClientContext(Func
/// A list of the IDs of the resources to retrieve.
/// The list of operations that can be performed over the GenericResources.
- public virtual IReadOnlyList GetGenericResourceOperations(params string[] ids)
+ public virtual IReadOnlyList GetGenericResources(params ResourceIdentifier[] ids)
{
return GetGenericResourceOperationsInternal(ids);
}
@@ -229,22 +239,42 @@ public virtual IReadOnlyList GetGenericResourceOperat
///
/// A list of the IDs of the resources to retrieve.
/// The list of operations that can be performed over the GenericResources.
- public virtual IReadOnlyList GetGenericResourceOperations(IEnumerable