outscale 1.0.1 published on Thursday, Mar 13, 2025 by outscale
outscale.getKeypair
Explore with Pulumi AI
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"],
    }],
});
import pulumi
import pulumi_outscale as outscale
keypair01 = outscale.get_keypair(filters=[{
    "name": "keypair_names",
    "values": ["terraform-keypair-01"],
}])
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
	})
}
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",
                },
            },
        },
    });
});
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());
    }
}
variables:
  keypair01:
    fn::invoke:
      function: outscale:getKeypair
      arguments:
        filters:
          - name: keypair_names
            values:
              - terraform-keypair-01
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>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]func LookupKeypair(ctx *Context, args *LookupKeypairArgs, opts ...InvokeOption) (*LookupKeypairResult, error)
func LookupKeypairOutput(ctx *Context, args *LookupKeypairOutputArgs, opts ...InvokeOption) LookupKeypairResultOutput> 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)
}public static CompletableFuture<GetKeypairResult> getKeypair(GetKeypairArgs args, InvokeOptions options)
public static Output<GetKeypairResult> getKeypair(GetKeypairArgs args, InvokeOptions options)
fn::invoke:
  function: outscale:index/getKeypair:getKeypair
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetKeypair Filter> 
- 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
[]GetKeypair Filter 
- 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<GetKeypair Filter> 
- 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
GetKeypair Filter[] 
- 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[GetKeypair Filter] 
- 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.
- KeypairName string
- The name of the keypair.
- RequestId string
- Filters
List<GetKeypair Filter> 
- Id string
- KeypairFingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- KeypairName string
- The name of the keypair.
- RequestId string
- Filters
[]GetKeypair Filter 
- id String
- keypairFingerprint String
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- keypairName String
- The name of the keypair.
- requestId String
- filters
List<GetKeypair Filter> 
- id string
- keypairFingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- keypairName string
- The name of the keypair.
- requestId string
- filters
GetKeypair Filter[] 
- id str
- keypair_fingerprint str
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- keypair_name str
- The name of the keypair.
- request_id str
- filters
Sequence[GetKeypair Filter] 
- id String
- keypairFingerprint String
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- keypairName String
- The name of the keypair.
- requestId String
- filters List<Property Map>
Supporting Types
GetKeypairFilter  
Package Details
- Repository
- outscale outscale/terraform-provider-outscale
- License
- Notes
- This Pulumi package is based on the outscaleTerraform Provider.