keypair

package
v0.2.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Use this data source to query SSH key pair list.

Example Usage

```hcl data "zenlayercloud_key_pairs" "all" { }

data "zenlayercloud_key_pairs" "myname" {
	key_name = "myname"
}

```

Provides a resource to manage key pair.

~> **NOTE:** This request is to import an SSH key pair to be used for later instance login..

~> **NOTE:** A key pair name and several public SSH keys are required.

Example Usage

```hcl

resource "zenlayercloud_key_pair" "foo" {
  key_name       	= "my_key"
  public_key    	= "ssh-rsa XXXXXXXXXXXX key"
  key_description	= "create a key pair"
}

```

Import

Key pair can be imported, e.g.

``` $ terraform import zenlayercloud_key_pair.foo key-xxxxxxx ```

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceZenlayerCloudKeyPairs

func DataSourceZenlayerCloudKeyPairs() *schema.Resource

func ResourceZenlayerCloudKeyPair

func ResourceZenlayerCloudKeyPair() *schema.Resource

Types

type CcsService

type CcsService struct {
	// contains filtered or unexported fields
}

func (*CcsService) DeleteKeyPair

func (s *CcsService) DeleteKeyPair(keyId string) error

func (*CcsService) DescribeKeyPairById

func (s *CcsService) DescribeKeyPairById(ctx context.Context, keyId string) (keyPair *ccs.KeyPair, err error)

func (*CcsService) DescribeKeyPairs

func (s *CcsService) DescribeKeyPairs(ctx context.Context, request *ccs.DescribeKeyPairsRequest) (keyPairs []*ccs.KeyPair, err error)

func (*CcsService) ModifyKeyPair

func (s *CcsService) ModifyKeyPair(ctx context.Context, keyId string, keyDesc *string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL