protected override void ProcessRecord() { if (InstanceObject != null) { string Project = InstanceObject.Project; string Instance = InstanceObject.Name; SslCertsResource.ListRequest request = Service.SslCerts.List(Project, Instance); SslCertsListResponse result = request.Execute(); WriteObject(result.Items, true); } else { if (Sha1Fingerprint != null) { SslCertsResource.GetRequest request = Service.SslCerts.Get(Project, Instance, Sha1Fingerprint); SslCert result = request.Execute(); WriteObject(result); } else { SslCertsResource.ListRequest request = Service.SslCerts.List(Project, Instance); SslCertsListResponse result = request.Execute(); WriteObject(result.Items, true); } } }
protected override void ProcessRecord() { SslCertsCreateEphemeralRequest body = new SslCertsCreateEphemeralRequest { PublicKey = PublicKey }; SslCertsResource.CreateEphemeralRequest request = Service.SslCerts.CreateEphemeral(body, Project, Instance); WriteVerbose($"Adding an ephemeral SSL Certificate to the Instance {Instance}."); SslCert result = request.Execute(); WriteObject(result); }