#region Copyright /* * Copyright © 2014-2016 NetApp, Inc. All Rights Reserved. * * CONFIDENTIALITY NOTICE: THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION OF * NETAPP, INC. USE, DISCLOSURE OR REPRODUCTION IS PROHIBITED WITHOUT THE PRIOR * EXPRESS WRITTEN PERMISSION OF NETAPP, INC. */ #endregion #region Using Directives using System.Linq; using System.Management.Automation; using SolidFire.Core; using SolidFire.Element.Api; #endregion namespace SolidFire.Cluster.Set { [Cmdlet(VerbsCommon.Set, "SFSSLCertificate", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High)] public class SFSSLCertificate : SFCmdlet { #region Private Data #endregion #region Parameters [Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The PEM-encoded text version of the certificate.")] public string Certificate { get; set; } [Parameter(Position = 1, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The PEM-encoded text version of the private key.")] public string PrivateKey { get; set; } #endregion #region Cmdlet Overrides protected override void BeginProcessing() { base.BeginProcessing(); CheckConnection(); } protected override void ProcessRecord() { base.ProcessRecord(); var request = new SetSSLCertificateRequest { Certificate = Certificate, PrivateKey = PrivateKey }; SendRequest("SetSSLCertificate", request); } #endregion } }