protected override void ProcessRecord() { var certificateOperation = this.DataServiceClient.GetCertificateOperation(VaultName, Name); var kvCertificateOperation = KeyVaultCertificateOperation.FromCertificateOperation(certificateOperation); this.WriteObject(kvCertificateOperation); }
protected override void ProcessRecord() { if (ShouldProcess(Name, Properties.Resources.AddCertificate)) { var certificateOperation = this.DataServiceClient.EnrollCertificate(VaultName, Name, CertificatePolicy == null ? null : CertificatePolicy.ToCertificatePolicy(), Tag == null ? null : Tag.ConvertToDictionary()); var kvCertificateOperation = KeyVaultCertificateOperation.FromCertificateOperation(certificateOperation); this.WriteObject(kvCertificateOperation); } }
protected override void ProcessRecord() { CertificateOperation certificateOperation = null; ConfirmAction( Force.IsPresent, string.Format( CultureInfo.InvariantCulture, "Are you sure you want to stop certificate operation for '{0}'?", Name), string.Format( CultureInfo.InvariantCulture, "Stop certificate operation for '{0}'", Name), Name, () => { certificateOperation = this.DataServiceClient.CancelCertificateOperation(VaultName, Name); var kvCertificateOperation = KeyVaultCertificateOperation.FromCertificateOperation(certificateOperation); this.WriteObject(kvCertificateOperation); }); }