1. Packages
  2. Scaleway
  3. API Docs
  4. getIamApiKey
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

scaleway.getIamApiKey

Explore with Pulumi AI

scaleway logo
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

    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";
    
    const main = scaleway.getIamApiKey({
        accessKey: "SCWABCDEFGHIJKLMNOPQ",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    main = scaleway.get_iam_api_key(access_key="SCWABCDEFGHIJKLMNOPQ")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupIamApiKey(ctx, &scaleway.LookupIamApiKeyArgs{
    			AccessKey: "SCWABCDEFGHIJKLMNOPQ",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = Scaleway.GetIamApiKey.Invoke(new()
        {
            AccessKey = "SCWABCDEFGHIJKLMNOPQ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetIamApiKeyArgs;
    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 main = ScalewayFunctions.getIamApiKey(GetIamApiKeyArgs.builder()
                .accessKey("SCWABCDEFGHIJKLMNOPQ")
                .build());
    
        }
    }
    
    variables:
      main:
        fn::invoke:
          Function: scaleway:getIamApiKey
          Arguments:
            accessKey: SCWABCDEFGHIJKLMNOPQ
    

    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>
    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]
    func LookupIamApiKey(ctx *Context, args *LookupIamApiKeyArgs, opts ...InvokeOption) (*LookupIamApiKeyResult, error)
    func LookupIamApiKeyOutput(ctx *Context, args *LookupIamApiKeyOutputArgs, opts ...InvokeOption) LookupIamApiKeyResultOutput

    > 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)
    }
    public static CompletableFuture<GetIamApiKeyResult> getIamApiKey(GetIamApiKeyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getIamApiKey:getIamApiKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccessKey string
    The access key of the IAM API key which is also the ID of the API key.
    AccessKey string
    The access key of the IAM API key which is also the ID of the API key.
    accessKey String
    The access key of the IAM API key which is also the ID of the API key.
    accessKey string
    The access key of the IAM API key which is also the ID of the API key.
    access_key str
    The access key of the IAM API key which is also the ID of the API key.
    accessKey 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 logo
    Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse