1. Packages
  2. Outscale Provider
  3. API Docs
  4. getKeypair
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.getKeypair

Explore with Pulumi AI

outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

Provides information about a keypair.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const keypair01 = outscale.getKeypair({
    filters: [{
        name: "keypair_names",
        values: ["terraform-keypair-01"],
    }],
});
Copy
import pulumi
import pulumi_outscale as outscale

keypair01 = outscale.get_keypair(filters=[{
    "name": "keypair_names",
    "values": ["terraform-keypair-01"],
}])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.LookupKeypair(ctx, &outscale.LookupKeypairArgs{
			Filters: []outscale.GetKeypairFilter{
				{
					Name: "keypair_names",
					Values: []string{
						"terraform-keypair-01",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var keypair01 = Outscale.GetKeypair.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetKeypairFilterInputArgs
            {
                Name = "keypair_names",
                Values = new[]
                {
                    "terraform-keypair-01",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetKeypairArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var keypair01 = OutscaleFunctions.getKeypair(GetKeypairArgs.builder()
            .filters(GetKeypairFilterArgs.builder()
                .name("keypair_names")
                .values("terraform-keypair-01")
                .build())
            .build());

    }
}
Copy
variables:
  keypair01:
    fn::invoke:
      function: outscale:getKeypair
      arguments:
        filters:
          - name: keypair_names
            values:
              - terraform-keypair-01
Copy

Using getKeypair

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 getKeypair(args: GetKeypairArgs, opts?: InvokeOptions): Promise<GetKeypairResult>
function getKeypairOutput(args: GetKeypairOutputArgs, opts?: InvokeOptions): Output<GetKeypairResult>
Copy
def get_keypair(filters: Optional[Sequence[GetKeypairFilter]] = None,
                id: Optional[str] = None,
                keypair_name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetKeypairResult
def get_keypair_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetKeypairFilterArgs]]]] = None,
                id: Optional[pulumi.Input[str]] = None,
                keypair_name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetKeypairResult]
Copy
func LookupKeypair(ctx *Context, args *LookupKeypairArgs, opts ...InvokeOption) (*LookupKeypairResult, error)
func LookupKeypairOutput(ctx *Context, args *LookupKeypairOutputArgs, opts ...InvokeOption) LookupKeypairResultOutput
Copy

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

public static class GetKeypair 
{
    public static Task<GetKeypairResult> InvokeAsync(GetKeypairArgs args, InvokeOptions? opts = null)
    public static Output<GetKeypairResult> Invoke(GetKeypairInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetKeypairResult> getKeypair(GetKeypairArgs args, InvokeOptions options)
public static Output<GetKeypairResult> getKeypair(GetKeypairArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: outscale:index/getKeypair:getKeypair
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetKeypairFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
KeypairName string
The name of the keypair.
Filters []GetKeypairFilter
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
KeypairName string
The name of the keypair.
filters List<GetKeypairFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
keypairName String
The name of the keypair.
filters GetKeypairFilter[]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id string
keypairName string
The name of the keypair.
filters Sequence[GetKeypairFilter]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id str
keypair_name str
The name of the keypair.
filters List<Property Map>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
keypairName String
The name of the keypair.

getKeypair Result

The following output properties are available:

Id string
KeypairFingerprint string
The MD5 public key fingerprint as specified in section 4 of RFC 4716.
KeypairId string
The ID of the keypair.
KeypairName string
The name of the keypair.
KeypairType string
The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
RequestId string
Tags List<GetKeypairTag>
One or more tags associated with the keypair.
Filters List<GetKeypairFilter>
Id string
KeypairFingerprint string
The MD5 public key fingerprint as specified in section 4 of RFC 4716.
KeypairId string
The ID of the keypair.
KeypairName string
The name of the keypair.
KeypairType string
The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
RequestId string
Tags []GetKeypairTag
One or more tags associated with the keypair.
Filters []GetKeypairFilter
id String
keypairFingerprint String
The MD5 public key fingerprint as specified in section 4 of RFC 4716.
keypairId String
The ID of the keypair.
keypairName String
The name of the keypair.
keypairType String
The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
requestId String
tags List<GetKeypairTag>
One or more tags associated with the keypair.
filters List<GetKeypairFilter>
id string
keypairFingerprint string
The MD5 public key fingerprint as specified in section 4 of RFC 4716.
keypairId string
The ID of the keypair.
keypairName string
The name of the keypair.
keypairType string
The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
requestId string
tags GetKeypairTag[]
One or more tags associated with the keypair.
filters GetKeypairFilter[]
id str
keypair_fingerprint str
The MD5 public key fingerprint as specified in section 4 of RFC 4716.
keypair_id str
The ID of the keypair.
keypair_name str
The name of the keypair.
keypair_type str
The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
request_id str
tags Sequence[GetKeypairTag]
One or more tags associated with the keypair.
filters Sequence[GetKeypairFilter]
id String
keypairFingerprint String
The MD5 public key fingerprint as specified in section 4 of RFC 4716.
keypairId String
The ID of the keypair.
keypairName String
The name of the keypair.
keypairType String
The type of the keypair (ssh-rsa, ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, or ecdsa-sha2-nistp521).
requestId String
tags List<Property Map>
One or more tags associated with the keypair.
filters List<Property Map>

Supporting Types

GetKeypairFilter

Name This property is required. string
Values This property is required. List<string>
Name This property is required. string
Values This property is required. []string
name This property is required. String
values This property is required. List<String>
name This property is required. string
values This property is required. string[]
name This property is required. str
values This property is required. Sequence[str]
name This property is required. String
values This property is required. List<String>

GetKeypairTag

Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.
key This property is required. string
The key of the tag, with a minimum of 1 character.
value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. str
The key of the tag, with a minimum of 1 character.
value This property is required. str
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale