public override void ExecuteCmdlet()
        {
            if (ResourceId != null)
            {
                var resourceIdentifier = new ResourceIdentifier(ResourceId);
                Name = resourceIdentifier.ResourceName;
                ResourceGroupName = resourceIdentifier.ResourceGroupName;
            }

            PSAttestation attestation = AttestationClient.GetAttestation(Name, ResourceGroupName);

            this.WriteObject(attestation);
        }
Example #2
0
        public override void ExecuteCmdlet()
        {
            if (ResourceId != null)
            {
                var resourceIdentifier = new ResourceIdentifier(ResourceId);
                Name = resourceIdentifier.ResourceName;
                ResourceGroupName = resourceIdentifier.ResourceGroupName;
            }

            if (string.IsNullOrEmpty(Name))
            {
                throw new CloudException(string.Format("ResourceNotSpecified", Name));
            }

            if (string.IsNullOrEmpty(ResourceGroupName))
            {
                throw new CloudException(string.Format("ResourceGroupNotSpecified", ResourceGroupName));
            }

            PSAttestation attestation = AttestationClient.GetAttestation(Name, ResourceGroupName);

            this.WriteObject(attestation);
        }