Example #1
0
        public async Task <ResourceCreateResponse> Handle(
            ResourceGroupCreateRequest request,
            CancellationToken cancellationToken)
        {
            var token = await _tokenBuilder.getToken();

            var result = await _resourceBuilder.CreateResourceGroup(
                token,
                request.SubscriptionId,
                request.ResourceGroupName,
                request.ResourceGroupLocation);

            return(new ResourceCreateResponse
            {
                ResourceId = result.Id,
                ResourceName = result.Name
            });
        }