sshpublickeys

package
v0.20240409.1113035 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/sshpublickeys Documentation

The sshpublickeys SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2023-03-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/sshpublickeys"

Client Initialization

client := sshpublickeys.NewSshPublicKeysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SshPublicKeysClient.Create

ctx := context.TODO()
id := sshpublickeys.NewSshPublicKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sshPublicKeyValue")

payload := sshpublickeys.SshPublicKeyResource{
	// ...
}


read, err := client.Create(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SshPublicKeysClient.Delete

ctx := context.TODO()
id := sshpublickeys.NewSshPublicKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sshPublicKeyValue")

read, err := client.Delete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SshPublicKeysClient.GenerateKeyPair

ctx := context.TODO()
id := sshpublickeys.NewSshPublicKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sshPublicKeyValue")

read, err := client.GenerateKeyPair(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SshPublicKeysClient.Get

ctx := context.TODO()
id := sshpublickeys.NewSshPublicKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sshPublicKeyValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: SshPublicKeysClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: SshPublicKeysClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.ListBySubscription(ctx, id)` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: SshPublicKeysClient.Update

ctx := context.TODO()
id := sshpublickeys.NewSshPublicKeyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "sshPublicKeyValue")

payload := sshpublickeys.SshPublicKeyUpdateResource{
	// ...
}


read, err := client.Update(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSshPublicKeyID

func ValidateSshPublicKeyID(input interface{}, key string) (warnings []string, errors []error)

ValidateSshPublicKeyID checks that 'input' can be parsed as a Ssh Public Key ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SshPublicKeyResource
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GenerateKeyPairOperationResponse

type GenerateKeyPairOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SshPublicKeyGenerateKeyPairResult
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SshPublicKeyResource
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SshPublicKeyResource
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SshPublicKeyResource
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SshPublicKeyResource
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SshPublicKeyResource
}

type SshPublicKeyGenerateKeyPairResult

type SshPublicKeyGenerateKeyPairResult struct {
	Id         string `json:"id"`
	PrivateKey string `json:"privateKey"`
	PublicKey  string `json:"publicKey"`
}

type SshPublicKeyId

type SshPublicKeyId struct {
	SubscriptionId    string
	ResourceGroupName string
	SshPublicKeyName  string
}

SshPublicKeyId is a struct representing the Resource ID for a Ssh Public Key

func NewSshPublicKeyID

func NewSshPublicKeyID(subscriptionId string, resourceGroupName string, sshPublicKeyName string) SshPublicKeyId

NewSshPublicKeyID returns a new SshPublicKeyId struct

func ParseSshPublicKeyID

func ParseSshPublicKeyID(input string) (*SshPublicKeyId, error)

ParseSshPublicKeyID parses 'input' into a SshPublicKeyId

func ParseSshPublicKeyIDInsensitively

func ParseSshPublicKeyIDInsensitively(input string) (*SshPublicKeyId, error)

ParseSshPublicKeyIDInsensitively parses 'input' case-insensitively into a SshPublicKeyId note: this method should only be used for API response data and not user input

func (*SshPublicKeyId) FromParseResult

func (id *SshPublicKeyId) FromParseResult(input resourceids.ParseResult) error

func (SshPublicKeyId) ID

func (id SshPublicKeyId) ID() string

ID returns the formatted Ssh Public Key ID

func (SshPublicKeyId) Segments

func (id SshPublicKeyId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Ssh Public Key ID

func (SshPublicKeyId) String

func (id SshPublicKeyId) String() string

String returns a human-readable description of this Ssh Public Key ID

type SshPublicKeyResource

type SshPublicKeyResource struct {
	Id         *string                         `json:"id,omitempty"`
	Location   string                          `json:"location"`
	Name       *string                         `json:"name,omitempty"`
	Properties *SshPublicKeyResourceProperties `json:"properties,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
	Type       *string                         `json:"type,omitempty"`
}

type SshPublicKeyResourceOperationPredicate

type SshPublicKeyResourceOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (SshPublicKeyResourceOperationPredicate) Matches

type SshPublicKeyResourceProperties

type SshPublicKeyResourceProperties struct {
	PublicKey *string `json:"publicKey,omitempty"`
}

type SshPublicKeyUpdateResource

type SshPublicKeyUpdateResource struct {
	Properties *SshPublicKeyResourceProperties `json:"properties,omitempty"`
	Tags       *map[string]string              `json:"tags,omitempty"`
}

type SshPublicKeysClient

type SshPublicKeysClient struct {
	Client *resourcemanager.Client
}

func NewSshPublicKeysClientWithBaseURI

func NewSshPublicKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*SshPublicKeysClient, error)

func (SshPublicKeysClient) Create

Create ...

func (SshPublicKeysClient) Delete

Delete ...

func (SshPublicKeysClient) GenerateKeyPair

GenerateKeyPair ...

func (SshPublicKeysClient) Get

Get ...

func (SshPublicKeysClient) ListByResourceGroup

ListByResourceGroup ...

func (SshPublicKeysClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (SshPublicKeysClient) ListByResourceGroupCompleteMatchingPredicate

func (c SshPublicKeysClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate SshPublicKeyResourceOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SshPublicKeysClient) ListBySubscription

ListBySubscription ...

func (SshPublicKeysClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (SshPublicKeysClient) ListBySubscriptionCompleteMatchingPredicate

func (c SshPublicKeysClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate SshPublicKeyResourceOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SshPublicKeysClient) Update

Update ...

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SshPublicKeyResource
}

Jump to

Keyboard shortcuts

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