1. Packages
  2. Scaleway
  3. API Docs
  4. getIamApiKey
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse

scaleway.getIamApiKey

Explore with Pulumi AI

Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse
Deprecated: scaleway.index/getiamapikey.getIamApiKey has been deprecated in favor of scaleway.iam/getapikey.getApiKey

Gets information about an existing IAM API key. For more information, refer to the IAM API documentation.

Example Usage

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

// Get api key infos by id (access_key)
const main = scaleway.iam.getApiKey({
    accessKey: "SCWABCDEFGHIJKLMNOPQ",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

# Get api key infos by id (access_key)
main = scaleway.iam.get_api_key(access_key="SCWABCDEFGHIJKLMNOPQ")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get api key infos by id (access_key)
		_, err := iam.LookupApiKey(ctx, &iam.LookupApiKeyArgs{
			AccessKey: "SCWABCDEFGHIJKLMNOPQ",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    // Get api key infos by id (access_key)
    var main = Scaleway.Iam.GetApiKey.Invoke(new()
    {
        AccessKey = "SCWABCDEFGHIJKLMNOPQ",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.iam.IamFunctions;
import com.pulumi.scaleway.iam.inputs.GetApiKeyArgs;
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) {
        // Get api key infos by id (access_key)
        final var main = IamFunctions.getApiKey(GetApiKeyArgs.builder()
            .accessKey("SCWABCDEFGHIJKLMNOPQ")
            .build());

    }
}
Copy
variables:
  # Get api key infos by id (access_key)
  main:
    fn::invoke:
      function: scaleway:iam:getApiKey
      arguments:
        accessKey: SCWABCDEFGHIJKLMNOPQ
Copy

Using getIamApiKey

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 getIamApiKey(args: GetIamApiKeyArgs, opts?: InvokeOptions): Promise<GetIamApiKeyResult>
function getIamApiKeyOutput(args: GetIamApiKeyOutputArgs, opts?: InvokeOptions): Output<GetIamApiKeyResult>
Copy
def get_iam_api_key(access_key: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetIamApiKeyResult
def get_iam_api_key_output(access_key: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetIamApiKeyResult]
Copy
func LookupIamApiKey(ctx *Context, args *LookupIamApiKeyArgs, opts ...InvokeOption) (*LookupIamApiKeyResult, error)
func LookupIamApiKeyOutput(ctx *Context, args *LookupIamApiKeyOutputArgs, opts ...InvokeOption) LookupIamApiKeyResultOutput
Copy

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

public static class GetIamApiKey 
{
    public static Task<GetIamApiKeyResult> InvokeAsync(GetIamApiKeyArgs args, InvokeOptions? opts = null)
    public static Output<GetIamApiKeyResult> Invoke(GetIamApiKeyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIamApiKeyResult> getIamApiKey(GetIamApiKeyArgs args, InvokeOptions options)
public static Output<GetIamApiKeyResult> getIamApiKey(GetIamApiKeyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getIamApiKey:getIamApiKey
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccessKey This property is required. string
The access key of the IAM API key which is also the ID of the API key.
AccessKey This property is required. string
The access key of the IAM API key which is also the ID of the API key.
accessKey This property is required. String
The access key of the IAM API key which is also the ID of the API key.
accessKey This property is required. string
The access key of the IAM API key which is also the ID of the API key.
access_key This property is required. str
The access key of the IAM API key which is also the ID of the API key.
accessKey This property is required. String
The access key of the IAM API key which is also the ID of the API key.

getIamApiKey Result

The following output properties are available:

AccessKey string
ApplicationId string
CreatedAt string
CreationIp string
DefaultProjectId string
Description string
Editable bool
ExpiresAt string
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
UserId string
AccessKey string
ApplicationId string
CreatedAt string
CreationIp string
DefaultProjectId string
Description string
Editable bool
ExpiresAt string
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
UserId string
accessKey String
applicationId String
createdAt String
creationIp String
defaultProjectId String
description String
editable Boolean
expiresAt String
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
userId String
accessKey string
applicationId string
createdAt string
creationIp string
defaultProjectId string
description string
editable boolean
expiresAt string
id string
The provider-assigned unique ID for this managed resource.
updatedAt string
userId string
access_key str
application_id str
created_at str
creation_ip str
default_project_id str
description str
editable bool
expires_at str
id str
The provider-assigned unique ID for this managed resource.
updated_at str
user_id str
accessKey String
applicationId String
createdAt String
creationIp String
defaultProjectId String
description String
editable Boolean
expiresAt String
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
userId String

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.
Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse