diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroup.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroup.java index bfa840c6c73..c6dc29f3603 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroup.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/ContainerGroup.java @@ -1188,11 +1188,126 @@ interface WithCreate extends } } + /** + * Grouping of container group update stages. + */ + interface UpdateStages { + /** + * The stage of the container group update allowing to enable System Assigned (Local) Managed Service Identity. + */ + @Beta(Beta.SinceVersion.V1_23_0) + interface WithSystemAssignedManagedServiceIdentity { + /** + * Specifies that System Assigned (Local) Managed Service Identity needs to be enabled in the + * virtual machine. + * + * @return the next stage of the update + */ + WithSystemAssignedIdentityBasedAccessOrUpdate withSystemAssignedManagedServiceIdentity(); + + /** + * Specifies that System Assigned (Local) Managed Service Identity needs to be disabled. + * + * @return the next stage of the update + */ + Update withoutSystemAssignedManagedServiceIdentity(); + } + + /** + * The stage of the System Assigned (Local) Managed Service Identity enabled container group allowing to + * set access role for the identity. + */ + @Beta(Beta.SinceVersion.V1_23_0) + interface WithSystemAssignedIdentityBasedAccessOrUpdate extends Update { + /** + * Specifies that container group's system assigned (local) identity should have the given + * access (described by the role) on an ARM resource identified by the resource ID. + * Applications running on the container group will have the same permission (role) on + * the ARM resource. + * + * @param resourceId the ARM identifier of the resource + * @param role access role to assigned to the container group's local identity + * @return the next stage of the update + */ + @Beta(Beta.SinceVersion.V1_23_0) + WithSystemAssignedIdentityBasedAccessOrUpdate withSystemAssignedIdentityBasedAccessTo(String resourceId, BuiltInRole role); + + /** + * Specifies that container group's system assigned (local) identity should have the given access + * (described by the role) on the resource group that virtual machine resides. Applications running + * on the container group will have the same permission (role) on the resource group. + * + * @param role access role to assigned to the container group's local identity + * @return the next stage of the update + */ + @Beta(Beta.SinceVersion.V1_23_0) + WithSystemAssignedIdentityBasedAccessOrUpdate withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(BuiltInRole role); + + /** + * Specifies that container group's system assigned (local) identity should have the access + * (described by the role definition) on an ARM resource identified by the resource ID. + * Applications running on the container group will have the same permission (role) on + * the ARM resource. + * + * @param resourceId scope of the access represented in ARM resource ID format + * @param roleDefinitionId access role definition to assigned to the container group's local identity + * @return the next stage of the update + */ + @Beta(Beta.SinceVersion.V1_23_0) + WithSystemAssignedIdentityBasedAccessOrUpdate withSystemAssignedIdentityBasedAccessTo(String resourceId, String roleDefinitionId); + + /** + * Specifies that container group's system assigned (local) identity should have the access (described by the + * role definition) on the resource group that container group resides. Applications running + * on the virtual machine will have the same permission (role) on the resource group. + * + * @param roleDefinitionId access role definition to assigned to the container group's local identity + * @return the next stage of the update + */ + @Beta(Beta.SinceVersion.V1_23_0) + WithSystemAssignedIdentityBasedAccessOrUpdate withSystemAssignedIdentityBasedAccessToCurrentResourceGroup(String roleDefinitionId); + } + + /** + * The stage of the container group update allowing to add or remove User Assigned (External) Managed Service Identities. + */ + @Beta(Beta.SinceVersion.V1_5_1) + interface WithUserAssignedManagedServiceIdentity { + /** + * Specifies the definition of a not-yet-created user assigned identity to be associated with the container group. + * + * @param creatableIdentity a creatable identity definition + * @return the next stage of the container group update + */ + @Beta(Beta.SinceVersion.V1_5_1) + Update withNewUserAssignedManagedServiceIdentity(Creatable creatableIdentity); + + /** + * Specifies an existing user assigned identity to be associated with the container group. + * @param identity the identity + * @return the next stage of the container group update + */ + @Beta(Beta.SinceVersion.V1_5_1) + Update withExistingUserAssignedManagedServiceIdentity(Identity identity); + + /** + * Specifies that an user assigned identity associated with the container group should be removed. + * + * @param identityId ARM resource id of the identity + * @return the next stage of the container group update + */ + @Beta(Beta.SinceVersion.V1_5_1) + Update withoutUserAssignedManagedServiceIdentity(String identityId); + } + } + /** * The template for an update operation, containing all the settings that can be modified. */ interface Update extends Resource.UpdateWithTags, + UpdateStages.WithSystemAssignedManagedServiceIdentity, + UpdateStages.WithUserAssignedManagedServiceIdentity, Appliable { } diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupImpl.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupImpl.java index c276f168430..e53af6b7d85 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupImpl.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupImpl.java @@ -74,6 +74,8 @@ public class ContainerGroupImpl ContainerInstanceManager> implements ContainerGroup, ContainerGroup.Definition, + ContainerGroup.DefinitionStages.WithSystemAssignedIdentityBasedAccessOrCreate, + ContainerGroup.UpdateStages.WithSystemAssignedIdentityBasedAccessOrUpdate, ContainerGroup.Update { private final StorageManager storageManager; @@ -117,7 +119,13 @@ public Observable call(ContainerGroupInner containerGroupIn } }); } else if (newFileShares == null || creatableStorageAccountKey == null) { - return self.manager().inner().containerGroups().createOrUpdateAsync(self.resourceGroupName(), self.name(), self.inner()); + return self.manager().inner().containerGroups().createOrUpdateAsync(self.resourceGroupName(), self.name(), self.inner()).map(new Func1() { + @Override + public ContainerGroupInner call(ContainerGroupInner containerGroupInner) { + self.containerGroupMsiHandler.reset(containerGroupInner); + return containerGroupInner; + } + }); } else { final StorageAccount storageAccount = this.taskResult(this.creatableStorageAccountKey); return createFileShareAsync(storageAccount) @@ -142,7 +150,13 @@ public Observable call(List() { + @Override + public ContainerGroupInner call(ContainerGroupInner containerGroupInner) { + self.containerGroupMsiHandler.reset(containerGroupInner); + return containerGroupInner; + } + }); } }); } @@ -288,6 +302,12 @@ public ContainerGroupImpl withSystemAssignedManagedServiceIdentity() { return this; } + @Override + public ContainerGroupImpl withoutSystemAssignedManagedServiceIdentity() { + this.containerGroupMsiHandler.withoutLocalManagedServiceIdentity(); + return this; + } + @Override public ContainerGroupImpl withSystemAssignedIdentityBasedAccessTo(String resourceId, BuiltInRole role) { this.containerGroupMsiHandler.withAccessTo(resourceId, role); @@ -324,6 +344,12 @@ public ContainerGroupImpl withExistingUserAssignedManagedServiceIdentity(Identit return this; } + @Override + public ContainerGroupImpl withoutUserAssignedManagedServiceIdentity(String identityId) { + this.containerGroupMsiHandler.withoutExternalManagedServiceIdentity(identityId); + return this; + } + @Override public ContainerGroupImpl withPublicImageRegistryOnly() { this.inner().withImageRegistryCredentials(null); diff --git a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupMsiHandler.java b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupMsiHandler.java index 95401ca3ad1..40ce072d8b3 100644 --- a/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupMsiHandler.java +++ b/azure-mgmt-containerinstance/src/main/java/com/microsoft/azure/management/containerinstance/implementation/ContainerGroupMsiHandler.java @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.Set; @LangDefinition class ContainerGroupMsiHandler extends RoleAssignmentHelper { @@ -45,8 +46,14 @@ void processCreatedExternalIdentities() { } void handleExternalIdentities() { - if (!this.userAssignedIdentities.isEmpty()) { - this.containerGroup.inner().identity().withUserAssignedIdentities(this.userAssignedIdentities); + this.containerGroup.inner().identity().withUserAssignedIdentities(this.userAssignedIdentities); + if (this.containerGroup.inner().identity().userAssignedIdentities() == null || this.containerGroup.inner().identity().userAssignedIdentities().size() == 0) { + if (this.containerGroup.inner().identity().type() == ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) { + this.containerGroup.inner().identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); + } + if (this.containerGroup.inner().identity().type() == ResourceIdentityType.USER_ASSIGNED) { + this.containerGroup.inner().identity().withType(ResourceIdentityType.NONE); + } } } @@ -62,6 +69,25 @@ ContainerGroupMsiHandler withLocalManagedServiceIdentity() { return this; } + /** + * Specifies that Local Managed Service Identity needs to be disabled in the container group. + * + * @return ContainerGroupMsiHandler + */ + ContainerGroupMsiHandler withoutLocalManagedServiceIdentity() { + if (this.containerGroup.inner().identity() == null + || this.containerGroup.inner().identity().type() == null + || this.containerGroup.inner().identity().type().equals(ResourceIdentityType.NONE) + || this.containerGroup.inner().identity().type().equals(ResourceIdentityType.USER_ASSIGNED)) { + return this; + } else if (this.containerGroup.inner().identity().type().equals(ResourceIdentityType.SYSTEM_ASSIGNED)) { + this.containerGroup.inner().identity().withType(ResourceIdentityType.NONE); + } else if (this.containerGroup.inner().identity().type().equals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)) { + this.containerGroup.inner().identity().withType(ResourceIdentityType.USER_ASSIGNED); + } + return this; + } + /** * Specifies that given identity should be set as one of the External Managed Service Identity * of the container instance. @@ -81,6 +107,13 @@ ContainerGroupMsiHandler withNewExternalManagedServiceIdentity(Creatable containerGroupList = azure.containerGroups().listByResourceGroup(rgName); @@ -1227,6 +1225,179 @@ public void testContainerInstanceWithPrivateIpAddress() throws Exception { } } + @Test + public void testContainerInstanceMSIUpdate() throws Exception { + final String cgName = SdkContext.randomResourceName("aci", 10); + final String rgName = SdkContext.randomResourceName("rgaci", 10); + String identityName1 = generateRandomResourceName("msi-id", 15); + String identityName2 = generateRandomResourceName("msi-id", 15); + + final Identity createdIdentity = msiManager.identities() + .define(identityName1) + .withRegion(Region.US_WEST) + .withNewResourceGroup(rgName) + .withAccessToCurrentResourceGroup(BuiltInRole.READER) + .create(); + + Creatable creatableIdentity = msiManager.identities() + .define(identityName2) + .withRegion(Region.US_WEST) + .withExistingResourceGroup(rgName) + .withAccessToCurrentResourceGroup(BuiltInRole.CONTRIBUTOR); + + + List dnsServers = new ArrayList(); + dnsServers.add("dnsServer1"); + ContainerGroup containerGroup = azure.containerGroups().define(cgName) + .withRegion(Region.US_EAST2) + .withExistingResourceGroup(rgName) + .withLinux() + .withPublicImageRegistryOnly() + .withEmptyDirectoryVolume("emptydir1") + .defineContainerInstance("tomcat") + .withImage("tomcat") + .withExternalTcpPort(8080) + .withCpuCoreCount(1) + .withEnvironmentVariable("ENV1", "value1") + .attach() + .defineContainerInstance("nginx") + .withImage("nginx") + .withExternalTcpPort(80) + .withEnvironmentVariableWithSecuredValue("ENV2", "securedValue1") + .attach() + .withExistingUserAssignedManagedServiceIdentity(createdIdentity) + .withNewUserAssignedManagedServiceIdentity(creatableIdentity) + .create(); + + Assert.assertEquals(cgName, containerGroup.name()); + Assert.assertEquals("Linux", containerGroup.osType().toString()); + Assert.assertEquals(0, containerGroup.imageRegistryServers().size()); + Assert.assertEquals(1, containerGroup.volumes().size()); + Assert.assertNotNull(containerGroup.volumes().get("emptydir1")); + Assert.assertNotNull(containerGroup.ipAddress()); + Assert.assertTrue(containerGroup.isIPAddressPublic()); + Assert.assertEquals(2, containerGroup.externalTcpPorts().length); + Assert.assertEquals(2, containerGroup.externalPorts().size()); + Assert.assertEquals(2, containerGroup.externalTcpPorts().length); + Assert.assertEquals(8080, containerGroup.externalTcpPorts()[0]); + Assert.assertEquals(80, containerGroup.externalTcpPorts()[1]); + Assert.assertEquals(2, containerGroup.containers().size()); + Container tomcatContainer = containerGroup.containers().get("tomcat"); + Assert.assertNotNull(tomcatContainer); + Container nginxContainer = containerGroup.containers().get("nginx"); + Assert.assertNotNull(nginxContainer); + Assert.assertEquals("tomcat", tomcatContainer.name()); + Assert.assertEquals("tomcat", tomcatContainer.image()); + Assert.assertEquals(1.0, tomcatContainer.resources().requests().cpu(), .1); + Assert.assertEquals(1.5, tomcatContainer.resources().requests().memoryInGB(), .1); + Assert.assertEquals(1, tomcatContainer.ports().size()); + Assert.assertEquals(8080, tomcatContainer.ports().get(0).port()); + Assert.assertNull(tomcatContainer.volumeMounts()); + Assert.assertNull(tomcatContainer.command()); + Assert.assertNotNull(tomcatContainer.environmentVariables()); + Assert.assertEquals(1, tomcatContainer.environmentVariables().size()); + Assert.assertEquals("nginx", nginxContainer.name()); + Assert.assertEquals("nginx", nginxContainer.image()); + Assert.assertEquals(1.0, nginxContainer.resources().requests().cpu(), .1); + Assert.assertEquals(1.5, nginxContainer.resources().requests().memoryInGB(), .1); + Assert.assertEquals(1, nginxContainer.ports().size()); + Assert.assertEquals(80, nginxContainer.ports().get(0).port()); + Assert.assertNull(nginxContainer.volumeMounts()); + Assert.assertNull(nginxContainer.command()); + Assert.assertNotNull(nginxContainer.environmentVariables()); + Assert.assertEquals(1, nginxContainer.environmentVariables().size()); + Assert.assertTrue(containerGroup.isManagedServiceIdentityEnabled()); + Assert.assertEquals(ResourceIdentityType.USER_ASSIGNED, containerGroup.managedServiceIdentityType()); + Assert.assertNull(containerGroup.systemAssignedManagedServiceIdentityPrincipalId()); // No Local MSI enabled + + // Ensure the "User Assigned (External) MSI" id can be retrieved from the virtual machine + // + Set emsiIds = containerGroup.userAssignedManagedServiceIdentityIds(); + Assert.assertNotNull(emsiIds); + Assert.assertEquals(2, emsiIds.size()); + ContainerGroup containerGroup2 = azure.containerGroups().getByResourceGroup(rgName, cgName); + + List containerGroupList = azure.containerGroups().listByResourceGroup(rgName); + Assert.assertTrue(containerGroupList.size() > 0); + Assert.assertNotNull(containerGroupList.get(0).state()); + + containerGroup.refresh(); + + Set containerGroupOperations = azure.containerGroups().listOperations(); + + // Number of supported operation can change hence don't assert with a predefined number. + Assert.assertTrue(containerGroupOperations.size() > 0); + + //Updating by getting rid of the two user assigned identities + Iterator itr = emsiIds.iterator(); + containerGroup.update() + .withoutUserAssignedManagedServiceIdentity(itr.next().replace("\\.", ".")) + .withoutUserAssignedManagedServiceIdentity(itr.next().replace("\\.", ".")) + .apply(); + Assert.assertEquals(0, containerGroup.userAssignedManagedServiceIdentityIds().size()); + if (containerGroup.managedServiceIdentityType() != null) { + Assert.assertTrue(containerGroup.managedServiceIdentityType().equals(ResourceIdentityType.NONE)); + } + // fetch container group again and validate + containerGroup.refresh(); + // + Assert.assertEquals(0, containerGroup.userAssignedManagedServiceIdentityIds().size()); + if (containerGroup.managedServiceIdentityType() != null) { + Assert.assertTrue(containerGroup.managedServiceIdentityType().equals(ResourceIdentityType.NONE)); + } + + itr = emsiIds.iterator(); + Identity identity1 = msiManager.identities().getById(itr.next()); + Identity identity2 = msiManager.identities().getById(itr.next()); + + // Update container group by enabled system MSI and adding two identities + containerGroup.update() + .withSystemAssignedManagedServiceIdentity() + .withExistingUserAssignedManagedServiceIdentity(identity1) + .withExistingUserAssignedManagedServiceIdentity(identity2) + .apply(); + + Assert.assertNotNull(containerGroup.userAssignedManagedServiceIdentityIds()); + Assert.assertEquals(2, containerGroup.userAssignedManagedServiceIdentityIds().size()); + Assert.assertNotNull(containerGroup.managedServiceIdentityType()); + Assert.assertTrue(containerGroup.managedServiceIdentityType().equals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)); + // + Assert.assertNotNull(containerGroup.systemAssignedManagedServiceIdentityPrincipalId()); + Assert.assertNotNull(containerGroup.systemAssignedManagedServiceIdentityTenantId()); + // + containerGroup.refresh(); + Assert.assertNotNull(containerGroup.userAssignedManagedServiceIdentityIds()); + Assert.assertEquals(2, containerGroup.userAssignedManagedServiceIdentityIds().size()); + Assert.assertNotNull(containerGroup.managedServiceIdentityType()); + Assert.assertTrue(containerGroup.managedServiceIdentityType().equals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)); + // + Assert.assertNotNull(containerGroup.systemAssignedManagedServiceIdentityPrincipalId()); + Assert.assertNotNull(containerGroup.systemAssignedManagedServiceIdentityTenantId()); + // + itr = emsiIds.iterator(); + // Remove identities one by one (first one) + containerGroup.update() + .withoutUserAssignedManagedServiceIdentity(itr.next()) + .apply(); + // + Assert.assertNotNull(containerGroup.userAssignedManagedServiceIdentityIds()); + Assert.assertEquals(1, containerGroup.userAssignedManagedServiceIdentityIds().size()); + Assert.assertNotNull(containerGroup.managedServiceIdentityType()); + Assert.assertTrue(containerGroup.managedServiceIdentityType().equals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)); + Assert.assertNotNull(containerGroup.systemAssignedManagedServiceIdentityPrincipalId()); + Assert.assertNotNull(containerGroup.systemAssignedManagedServiceIdentityTenantId()); + // Remove identities one by one (second one) + containerGroup.update() + .withoutUserAssignedManagedServiceIdentity(itr.next()) + .apply(); + // + Assert.assertEquals(0, containerGroup.userAssignedManagedServiceIdentityIds().size()); + Assert.assertNotNull(containerGroup.managedServiceIdentityType()); + Assert.assertTrue(containerGroup.managedServiceIdentityType().equals(ResourceIdentityType.SYSTEM_ASSIGNED)); + // + + } + @Test public void testContainerRegistry() throws Exception { new TestContainerRegistry() diff --git a/azure/src/test/resources/session-records/testContainerInstanceMSIUpdate.json b/azure/src/test/resources/session-records/testContainerInstanceMSIUpdate.json new file mode 100644 index 00000000000..6773bd9d05a --- /dev/null +++ b/azure/src/test/resources/session-records/testContainerInstanceMSIUpdate.json @@ -0,0 +1,484 @@ +{ + "networkCallRecords" : [ { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816?api-version=2017-05-10", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ResourceManagementClient, 2017-05-10)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:52:57 GMT", + "content-length" : "257", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1199", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "23e6c883-c7ca-4661-bb80-d2be85a44467", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155258Z:23e6c883-c7ca-4661-bb80-d2be85a44467", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "23e6c883-c7ca-4661-bb80-d2be85a44467", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816\",\"name\":\"rgaci23816\",\"location\":\"westus\",\"tags\":{\"date\":\"2019-06-24T15:52:56.567Z\",\"product\":\"javasdk\",\"cause\":\"automation\"},\"properties\":{\"provisioningState\":\"Succeeded\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2b587410?api-version=2018-11-30", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ManagedServiceIdentityClient, 2018-11-30)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:52:59 GMT", + "content-length" : "440", + "server" : "Microsoft-HTTPAPI/2.0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1198", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "4ccd3761-78b0-4de1-98df-05ab0120ed67", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155259Z:4ccd3761-78b0-4de1-98df-05ab0120ed67", + "content-type" : "application/json; charset=utf-8", + "location" : "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2b587410", + "cache-control" : "no-cache", + "x-ms-request-id" : "4ccd3761-78b0-4de1-98df-05ab0120ed67", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2b587410\",\"name\":\"msi-id2b587410\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"principalId\":\"25284086-1cfa-4cd4-9799-e1b5d3208901\",\"clientId\":\"afcb81d8-1b04-4311-b46f-9f4b30db86bb\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleDefinitions?%24filter=roleName%20eq%20%27Reader%27&api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:00 GMT", + "content-length" : "615", + "expires" : "-1", + "vary" : "Accept-Encoding", + "x-ms-request-charge" : "1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11999", + "StatusCode" : "200", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "8d5e6983-548c-40e3-a8ca-7e52b4ddce2c", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155300Z:8d5e6983-548c-40e3-a8ca-7e52b4ddce2c", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "f19fd605-b539-415e-9cab-888c9c7ff7ad", + "Body" : "{\"value\":[{\"properties\":{\"roleName\":\"Reader\",\"type\":\"BuiltInRole\",\"description\":\"Lets you view everything, but not make any changes.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*/read\"],\"notActions\":[],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:35.7424745Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"acdd72a7-3385-48ef-bd42-f606fba81ae7\"}]}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/b95c0d14-bd0c-4fec-955e-8a2f69afdb6f?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:01 GMT", + "content-length" : "163", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1197", + "retry-after" : "0", + "StatusCode" : "400", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "de421f32-e24c-4be3-8c85-4b9bd53cb2a2", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155301Z:de421f32-e24c-4be3-8c85-4b9bd53cb2a2", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "e1743f4f-1b20-4d53-a46a-cc16c7f46b2e", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 252840861cfa4cd49799e1b5d3208901 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/b95c0d14-bd0c-4fec-955e-8a2f69afdb6f?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:02 GMT", + "content-length" : "163", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1196", + "retry-after" : "0", + "StatusCode" : "400", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "9b71961e-c3c6-4018-a209-446fda585f02", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155302Z:9b71961e-c3c6-4018-a209-446fda585f02", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "3e61c111-d9c9-4742-a34c-2f5e03500e1b", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 252840861cfa4cd49799e1b5d3208901 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/b95c0d14-bd0c-4fec-955e-8a2f69afdb6f?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:05 GMT", + "content-length" : "163", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1195", + "retry-after" : "0", + "StatusCode" : "400", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "7b3e0cd0-36cb-4f30-9c1c-08e77543d585", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155305Z:7b3e0cd0-36cb-4f30-9c1c-08e77543d585", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "876a650c-662e-4b7d-8e40-88353669fec7", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 252840861cfa4cd49799e1b5d3208901 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/b95c0d14-bd0c-4fec-955e-8a2f69afdb6f?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:10 GMT", + "content-length" : "773", + "expires" : "-1", + "x-ms-request-charge" : "2", + "x-ms-ratelimit-remaining-subscription-writes" : "1194", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "affe0097-6c8e-4971-89a1-ab0efea63650", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155310Z:affe0097-6c8e-4971-89a1-ab0efea63650", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "00afb999-cfe6-46d5-9b5d-12a043105c95", + "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7\",\"principalId\":\"25284086-1cfa-4cd4-9799-e1b5d3208901\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816\",\"createdOn\":\"2019-06-24T15:53:08.5829102Z\",\"updatedOn\":\"2019-06-24T15:53:08.5829102Z\",\"createdBy\":null,\"updatedBy\":\"1c93a1ad-59cf-42fc-b6ce-0f5ffd464a70\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/b95c0d14-bd0c-4fec-955e-8a2f69afdb6f\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"b95c0d14-bd0c-4fec-955e-8a2f69afdb6f\"}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id52970521?api-version=2018-11-30", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ManagedServiceIdentityClient, 2018-11-30)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:12 GMT", + "content-length" : "440", + "server" : "Microsoft-HTTPAPI/2.0", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1193", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "0066050a-4c8e-41bb-bc8e-acd600bd0e75", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155312Z:0066050a-4c8e-41bb-bc8e-acd600bd0e75", + "content-type" : "application/json; charset=utf-8", + "location" : "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id52970521", + "cache-control" : "no-cache", + "x-ms-request-id" : "0066050a-4c8e-41bb-bc8e-acd600bd0e75", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id52970521\",\"name\":\"msi-id52970521\",\"type\":\"Microsoft.ManagedIdentity/userAssignedIdentities\",\"location\":\"westus\",\"tags\":{},\"properties\":{\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"principalId\":\"5682f55d-9337-4d43-a59d-9c1cc85b5fd0\",\"clientId\":\"270444e7-fb90-40be-9b07-e811f27c5ad7\"}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleDefinitions?%24filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:12 GMT", + "content-length" : "832", + "expires" : "-1", + "vary" : "Accept-Encoding", + "x-ms-request-charge" : "1", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11998", + "StatusCode" : "200", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "68b54674-e7ad-4b91-9037-fcc8a6671de3", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155312Z:68b54674-e7ad-4b91-9037-fcc8a6671de3", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "9b1bd04b-ea50-437e-a9f2-1d991b254986", + "Body" : "{\"value\":[{\"properties\":{\"roleName\":\"Contributor\",\"type\":\"BuiltInRole\",\"description\":\"Lets you manage everything except access to resources.\",\"assignableScopes\":[\"/\"],\"permissions\":[{\"actions\":[\"*\"],\"notActions\":[\"Microsoft.Authorization/*/Delete\",\"Microsoft.Authorization/*/Write\",\"Microsoft.Authorization/elevateAccess/Action\",\"Microsoft.Blueprint/blueprintAssignments/write\",\"Microsoft.Blueprint/blueprintAssignments/delete\"],\"dataActions\":[],\"notDataActions\":[]}],\"createdOn\":\"2015-02-02T21:55:09.8806423Z\",\"updatedOn\":\"2019-02-05T21:24:38.4580610Z\",\"createdBy\":null,\"updatedBy\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"type\":\"Microsoft.Authorization/roleDefinitions\",\"name\":\"b24988ac-6180-42a0-ab88-20f7382dd24c\"}]}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/94a60ba7-b248-48c5-9716-50e4012abb7d?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:13 GMT", + "content-length" : "163", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1192", + "retry-after" : "0", + "StatusCode" : "400", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "77ab293b-e9db-482c-8416-2fd677bcc42f", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155313Z:77ab293b-e9db-482c-8416-2fd677bcc42f", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "c79e492d-c172-410d-8aab-100225d50cc8", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 5682f55d93374d43a59d9c1cc85b5fd0 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/94a60ba7-b248-48c5-9716-50e4012abb7d?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:14 GMT", + "content-length" : "163", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1191", + "retry-after" : "0", + "StatusCode" : "400", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "d5290114-ddc4-4e2c-b5aa-08b63f0d6ffc", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155315Z:d5290114-ddc4-4e2c-b5aa-08b63f0d6ffc", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "86c99d70-0d3a-4172-852c-c454c14f8b70", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 5682f55d93374d43a59d9c1cc85b5fd0 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/94a60ba7-b248-48c5-9716-50e4012abb7d?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:17 GMT", + "content-length" : "163", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1190", + "retry-after" : "0", + "StatusCode" : "400", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "c3bfdf28-92d1-4c6e-abaa-00a32b0b9ace", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155317Z:c3bfdf28-92d1-4c6e-abaa-00a32b0b9ace", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "2b73a79a-02ad-4bca-96e3-cf8718490d38", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 5682f55d93374d43a59d9c1cc85b5fd0 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/94a60ba7-b248-48c5-9716-50e4012abb7d?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:21 GMT", + "content-length" : "163", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1189", + "retry-after" : "0", + "StatusCode" : "400", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "9228879a-238a-47e8-8fd4-877abd05019d", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155321Z:9228879a-238a-47e8-8fd4-877abd05019d", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "8f2a1443-3387-43ba-bd96-e7203c0cc6cf", + "Body" : "{\"error\":{\"code\":\"PrincipalNotFound\",\"message\":\"Principal 5682f55d93374d43a59d9c1cc85b5fd0 does not exist in the directory 00000000-0000-0000-0000-000000000000.\"}}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/94a60ba7-b248-48c5-9716-50e4012abb7d?api-version=2018-01-01-preview", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (AuthorizationManagementClient)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:26 GMT", + "content-length" : "773", + "expires" : "-1", + "x-ms-request-charge" : "2", + "x-ms-ratelimit-remaining-subscription-writes" : "1188", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "535979f0-cddf-4f49-a81c-119d4ca2a0e1", + "set-cookie" : "x-ms-gateway-slice=Production; path=/; secure; HttpOnly", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155327Z:535979f0-cddf-4f49-a81c-119d4ca2a0e1", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "7f72483a-f8d9-462e-8366-861061bb8f90", + "Body" : "{\"properties\":{\"roleDefinitionId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c\",\"principalId\":\"5682f55d-9337-4d43-a59d-9c1cc85b5fd0\",\"principalType\":\"ServicePrincipal\",\"scope\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816\",\"createdOn\":\"2019-06-24T15:53:25.7245445Z\",\"updatedOn\":\"2019-06-24T15:53:25.7245445Z\",\"createdBy\":null,\"updatedBy\":\"1c93a1ad-59cf-42fc-b6ce-0f5ffd464a70\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.Authorization/roleAssignments/94a60ba7-b248-48c5-9716-50e4012abb7d\",\"type\":\"Microsoft.Authorization/roleAssignments\",\"name\":\"94a60ba7-b248-48c5-9716-50e4012abb7d\"}" + } + }, { + "Method" : "PUT", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ContainerInstance/containerGroups/aci51823b?api-version=2018-10-01", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ContainerInstanceManagementClient, 2018-10-01)", + "Content-Type" : "application/json; charset=utf-8" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:30 GMT", + "content-length" : "1560", + "expires" : "-1", + "x-ms-ratelimit-remaining-subscription-writes" : "1187", + "retry-after" : "0", + "StatusCode" : "201", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "3a88c96c-a61d-4f77-858a-2d10e87377bc", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt1h" : "299", + "x-ms-ratelimit-remaining-subscription-resource-requests-pt5m" : "99", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155330Z:3a88c96c-a61d-4f77-858a-2d10e87377bc", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus2:46b74765-6c96-41f5-b44e-5ed67be860bc", + "Body" : "{\"properties\":{\"provisioningState\":\"Pending\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.232.227.90\",\"type\":\"Public\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Pending\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id52970521\":{\"principalId\":\"5682f55d-9337-4d43-a59d-9c1cc85b5fd0\",\"clientId\":\"270444e7-fb90-40be-9b07-e811f27c5ad7\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2b587410\":{\"principalId\":\"25284086-1cfa-4cd4-9799-e1b5d3208901\",\"clientId\":\"afcb81d8-1b04-4311-b46f-9f4b30db86bb\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ContainerInstance/containerGroups/aci51823b\",\"name\":\"aci51823b\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{}}", + "azure-asyncoperation" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/46b74765-6c96-41f5-b44e-5ed67be860bc?api-version=2018-06-01" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/46b74765-6c96-41f5-b44e-5ed67be860bc?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ContainerInstanceManagementClient, 2018-10-01)" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:53:30 GMT", + "content-length" : "239", + "expires" : "-1", + "vary" : "Accept-Encoding,Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11997", + "StatusCode" : "200", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "67a1dfcc-a63e-49f0-9cd9-d7c9875b8871", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155331Z:67a1dfcc-a63e-49f0-9cd9-d7c9875b8871", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus2:af6056e0-59cd-4fd4-b867-89ad6859851d", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ContainerInstance/containerGroups/aci51823b\",\"status\":\"Pending\",\"startTime\":\"2019-06-24T15:53:30.4957019Z\",\"properties\":{\"events\":[]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/46b74765-6c96-41f5-b44e-5ed67be860bc?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ContainerInstanceManagementClient, 2018-10-01)" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:54:01 GMT", + "content-length" : "239", + "expires" : "-1", + "vary" : "Accept-Encoding,Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11996", + "StatusCode" : "200", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "d53045a8-09b3-4889-94b4-727ecc5033eb", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155401Z:d53045a8-09b3-4889-94b4-727ecc5033eb", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus2:6835cfc3-1396-4554-9a90-2178b7cd70a6", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ContainerInstance/containerGroups/aci51823b\",\"status\":\"Pending\",\"startTime\":\"2019-06-24T15:53:30.4957019Z\",\"properties\":{\"events\":[]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/eastus2/operations/46b74765-6c96-41f5-b44e-5ed67be860bc?api-version=2018-06-01", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ContainerInstanceManagementClient, 2018-10-01)" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:54:31 GMT", + "content-length" : "1520", + "expires" : "-1", + "vary" : "Accept-Encoding,Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11995", + "StatusCode" : "200", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "b750c46a-4d51-48ee-a5c9-27f2d896abe9", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155432Z:b750c46a-4d51-48ee-a5c9-27f2d896abe9", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus2:e3b68aca-bdd2-4f85-ab53-6d3e40b85d27", + "Body" : "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ContainerInstance/containerGroups/aci51823b\",\"status\":\"Succeeded\",\"startTime\":\"2019-06-24T15:53:30.4957019Z\",\"properties\":{\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:53:35Z\",\"lastTimestamp\":\"2019-06-24T15:53:35Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:53:53Z\",\"lastTimestamp\":\"2019-06-24T15:53:53Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:12Z\",\"lastTimestamp\":\"2019-06-24T15:54:12Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:13Z\",\"lastTimestamp\":\"2019-06-24T15:54:13Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:13Z\",\"lastTimestamp\":\"2019-06-24T15:54:13Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:19Z\",\"lastTimestamp\":\"2019-06-24T15:54:19Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:23Z\",\"lastTimestamp\":\"2019-06-24T15:54:23Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:23Z\",\"lastTimestamp\":\"2019-06-24T15:54:23Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]}}" + } + }, { + "Method" : "GET", + "Uri" : "http://localhost:1234/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ContainerInstance/containerGroups/aci51823b?api-version=2018-10-01", + "Headers" : { + "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:ffbf486a22107d1f97bb85c96f5f1055aa63cbc50947322b765dbcaa8644bcd7 Java:11.0.3 (ContainerInstanceManagementClient, 2018-10-01)" + }, + "Response" : { + "date" : "Mon, 24 Jun 2019 15:54:31 GMT", + "content-length" : "3108", + "expires" : "-1", + "vary" : "Accept-Encoding,Accept-Encoding", + "retry-after" : "0", + "x-ms-ratelimit-remaining-subscription-reads" : "11994", + "StatusCode" : "200", + "pragma" : "no-cache", + "strict-transport-security" : "max-age=31536000; includeSubDomains", + "x-ms-correlation-request-id" : "dc640620-c862-4715-a8f5-ece63b3d8e00", + "x-content-type-options" : "nosniff", + "x-ms-routing-request-id" : "WESTUS:20190624T155432Z:dc640620-c862-4715-a8f5-ece63b3d8e00", + "content-type" : "application/json; charset=utf-8", + "cache-control" : "no-cache", + "x-ms-request-id" : "eastus2:c982ff7a-c677-4d12-8f0e-f9d629a35b5b", + "Body" : "{\"properties\":{\"provisioningState\":\"Succeeded\",\"containers\":[{\"name\":\"tomcat\",\"properties\":{\"image\":\"tomcat\",\"ports\":[{\"protocol\":\"TCP\",\"port\":8080}],\"environmentVariables\":[{\"name\":\"ENV1\",\"value\":\"value1\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-06-24T15:54:13Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:53:35Z\",\"lastTimestamp\":\"2019-06-24T15:53:35Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:53:53Z\",\"lastTimestamp\":\"2019-06-24T15:53:53Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"tomcat\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:12Z\",\"lastTimestamp\":\"2019-06-24T15:54:12Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:13Z\",\"lastTimestamp\":\"2019-06-24T15:54:13Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}},{\"name\":\"nginx\",\"properties\":{\"image\":\"nginx\",\"ports\":[{\"protocol\":\"TCP\",\"port\":80}],\"environmentVariables\":[{\"name\":\"ENV2\"}],\"instanceView\":{\"restartCount\":0,\"currentState\":{\"state\":\"Running\",\"startTime\":\"2019-06-24T15:54:23Z\",\"detailStatus\":\"\"},\"events\":[{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:13Z\",\"lastTimestamp\":\"2019-06-24T15:54:13Z\",\"name\":\"Pulling\",\"message\":\"pulling image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:19Z\",\"lastTimestamp\":\"2019-06-24T15:54:19Z\",\"name\":\"Pulled\",\"message\":\"Successfully pulled image \\\"nginx\\\"\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:23Z\",\"lastTimestamp\":\"2019-06-24T15:54:23Z\",\"name\":\"Created\",\"message\":\"Created container\",\"type\":\"Normal\"},{\"count\":1,\"firstTimestamp\":\"2019-06-24T15:54:23Z\",\"lastTimestamp\":\"2019-06-24T15:54:23Z\",\"name\":\"Started\",\"message\":\"Started container\",\"type\":\"Normal\"}]},\"resources\":{\"requests\":{\"memoryInGB\":1.5,\"cpu\":1.0}}}}],\"ipAddress\":{\"ports\":[{\"protocol\":\"TCP\",\"port\":8080},{\"protocol\":\"TCP\",\"port\":80}],\"ip\":\"52.232.227.90\",\"type\":\"Public\"},\"osType\":\"Linux\",\"volumes\":[{\"name\":\"emptydir1\",\"emptyDir\":{}}],\"instanceView\":{\"events\":[],\"state\":\"Running\"}},\"identity\":{\"userAssignedIdentities\":{\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id52970521\":{\"principalId\":\"5682f55d-9337-4d43-a59d-9c1cc85b5fd0\",\"clientId\":\"270444e7-fb90-40be-9b07-e811f27c5ad7\"},\"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgaci23816/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-id2b587410\":{\"principalId\":\"25284086-1cfa-4cd4-9799-e1b5d3208901\",\"clientId\":\"afcb81d8-1b04-4311-b46f-9f4b30db86bb\"}},\"tenantId\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"UserAssigned\"},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgaci23816/providers/Microsoft.ContainerInstance/containerGroups/aci51823b\",\"name\":\"aci51823b\",\"type\":\"Microsoft.ContainerInstance/containerGroups\",\"location\":\"eastus2\",\"tags\":{}}" + } + } ], + "variables" : [ "aci51823b", "rgaci23816", "msi-id2b587410", "msi-id52970521", "f4f71ee0-9f18-4266-bc4d-344ef52a4b14", "36595e8a-e252-4001-8f12-4caf2ec71fc2", "e268e2a3-53a8-4d0e-adc7-e5621a413837", "b95c0d14-bd0c-4fec-955e-8a2f69afdb6f", "6bd26e96-4300-40ca-8be5-1b1e707ceac1", "ef1b7de5-233c-4f88-9b04-2e65a81821b6", "ef5cc51c-ea47-476c-aa16-5073b4984616", "4b719588-0f53-417c-ae80-9017f32d7b9b", "94a60ba7-b248-48c5-9716-50e4012abb7d", "8c89ebc9-8ff4-4b95-b883-a9e5cba70caa" ] +} \ No newline at end of file