README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-11-01/sshpublickeys
Documentation
The sshpublickeys
SDK allows for interaction with the Azure Resource Manager Service compute
(API Version 2021-11-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/2021-11-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 ¶
- func ValidateSshPublicKeyID(input interface{}, key string) (warnings []string, errors []error)
- type CreateOperationResponse
- type DeleteOperationResponse
- type GenerateKeyPairOperationResponse
- type GetOperationResponse
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type SshPublicKeyGenerateKeyPairResult
- type SshPublicKeyId
- type SshPublicKeyResource
- type SshPublicKeyResourceOperationPredicate
- type SshPublicKeyResourceProperties
- type SshPublicKeyUpdateResource
- type SshPublicKeysClient
- func (c SshPublicKeysClient) Create(ctx context.Context, id SshPublicKeyId, input SshPublicKeyResource) (result CreateOperationResponse, err error)
- func (c SshPublicKeysClient) Delete(ctx context.Context, id SshPublicKeyId) (result DeleteOperationResponse, err error)
- func (c SshPublicKeysClient) GenerateKeyPair(ctx context.Context, id SshPublicKeyId) (result GenerateKeyPairOperationResponse, err error)
- func (c SshPublicKeysClient) Get(ctx context.Context, id SshPublicKeyId) (result GetOperationResponse, err error)
- func (c SshPublicKeysClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c SshPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c SshPublicKeysClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c SshPublicKeysClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
- func (c SshPublicKeysClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c SshPublicKeysClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListBySubscriptionCompleteResult, err error)
- func (c SshPublicKeysClient) Update(ctx context.Context, id SshPublicKeyId, input SshPublicKeyUpdateResource) (result UpdateOperationResponse, err error)
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSshPublicKeyID ¶
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 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 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 SshPublicKeyResourceOperationPredicate ¶
type SshPublicKeyResourceOperationPredicate struct { Id *string Location *string Name *string Type *string }
func (SshPublicKeyResourceOperationPredicate) Matches ¶
func (p SshPublicKeyResourceOperationPredicate) Matches(input SshPublicKeyResource) bool
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 ¶
func (c SshPublicKeysClient) Create(ctx context.Context, id SshPublicKeyId, input SshPublicKeyResource) (result CreateOperationResponse, err error)
Create ...
func (SshPublicKeysClient) Delete ¶
func (c SshPublicKeysClient) Delete(ctx context.Context, id SshPublicKeyId) (result DeleteOperationResponse, err error)
Delete ...
func (SshPublicKeysClient) GenerateKeyPair ¶
func (c SshPublicKeysClient) GenerateKeyPair(ctx context.Context, id SshPublicKeyId) (result GenerateKeyPairOperationResponse, err error)
GenerateKeyPair ...
func (SshPublicKeysClient) Get ¶
func (c SshPublicKeysClient) Get(ctx context.Context, id SshPublicKeyId) (result GetOperationResponse, err error)
Get ...
func (SshPublicKeysClient) ListByResourceGroup ¶
func (c SshPublicKeysClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (SshPublicKeysClient) ListByResourceGroupComplete ¶
func (c SshPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
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 ¶
func (c SshPublicKeysClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (SshPublicKeysClient) ListBySubscriptionComplete ¶
func (c SshPublicKeysClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
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 ¶
func (c SshPublicKeysClient) Update(ctx context.Context, id SshPublicKeyId, input SshPublicKeyUpdateResource) (result UpdateOperationResponse, err error)
Update ...
type UpdateOperationResponse ¶
type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *SshPublicKeyResource }
Source Files ¶
- client.go
- id_sshpublickey.go
- method_create.go
- method_delete.go
- method_generatekeypair.go
- method_get.go
- method_listbyresourcegroup.go
- method_listbysubscription.go
- method_update.go
- model_sshpublickeygeneratekeypairresult.go
- model_sshpublickeyresource.go
- model_sshpublickeyresourceproperties.go
- model_sshpublickeyupdateresource.go
- predicates.go
- version.go