1. Packages
  2. Azure Native
  3. API Docs
  4. compute
  5. getSshPublicKey
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.compute.getSshPublicKey

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

Retrieves information about an SSH public key.

Uses Azure REST API version 2024-11-01.

Other available API versions: 2022-08-01, 2022-11-01, 2023-03-01, 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native compute [ApiVersion]. See the version guide for details.

Using getSshPublicKey

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getSshPublicKey(args: GetSshPublicKeyArgs, opts?: InvokeOptions): Promise<GetSshPublicKeyResult>
function getSshPublicKeyOutput(args: GetSshPublicKeyOutputArgs, opts?: InvokeOptions): Output<GetSshPublicKeyResult>
Copy
def get_ssh_public_key(resource_group_name: Optional[str] = None,
                       ssh_public_key_name: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSshPublicKeyResult
def get_ssh_public_key_output(resource_group_name: Optional[pulumi.Input[str]] = None,
                       ssh_public_key_name: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetSshPublicKeyResult]
Copy
func LookupSshPublicKey(ctx *Context, args *LookupSshPublicKeyArgs, opts ...InvokeOption) (*LookupSshPublicKeyResult, error)
func LookupSshPublicKeyOutput(ctx *Context, args *LookupSshPublicKeyOutputArgs, opts ...InvokeOption) LookupSshPublicKeyResultOutput
Copy

> Note: This function is named LookupSshPublicKey in the Go SDK.

public static class GetSshPublicKey 
{
    public static Task<GetSshPublicKeyResult> InvokeAsync(GetSshPublicKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetSshPublicKeyResult> Invoke(GetSshPublicKeyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetSshPublicKeyResult> getSshPublicKey(GetSshPublicKeyArgs args, InvokeOptions options)
public static Output<GetSshPublicKeyResult> getSshPublicKey(GetSshPublicKeyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:compute:getSshPublicKey
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
SshPublicKeyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the SSH public key.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
SshPublicKeyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the SSH public key.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
sshPublicKeyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the SSH public key.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
sshPublicKeyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the SSH public key.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
ssh_public_key_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the SSH public key.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
sshPublicKeyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the SSH public key.

getSshPublicKey Result

The following output properties are available:

AzureApiVersion string
The Azure API version of the resource.
Id string
Resource Id
Location string
Resource location
Name string
Resource name
Type string
Resource type
PublicKey string
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
Tags Dictionary<string, string>
Resource tags
AzureApiVersion string
The Azure API version of the resource.
Id string
Resource Id
Location string
Resource location
Name string
Resource name
Type string
Resource type
PublicKey string
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
Tags map[string]string
Resource tags
azureApiVersion String
The Azure API version of the resource.
id String
Resource Id
location String
Resource location
name String
Resource name
type String
Resource type
publicKey String
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
tags Map<String,String>
Resource tags
azureApiVersion string
The Azure API version of the resource.
id string
Resource Id
location string
Resource location
name string
Resource name
type string
Resource type
publicKey string
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
tags {[key: string]: string}
Resource tags
azure_api_version str
The Azure API version of the resource.
id str
Resource Id
location str
Resource location
name str
Resource name
type str
Resource type
public_key str
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
tags Mapping[str, str]
Resource tags
azureApiVersion String
The Azure API version of the resource.
id String
Resource Id
location String
Resource location
name String
Resource name
type String
Resource type
publicKey String
SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
tags Map<String>
Resource tags

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi