Ovh

v0.1.0 published on Friday, Nov 4, 2022 by lbrlabs

getKafkaUserAccess

Use this data source to get information about user acces of a kafka cluster associated with a public cloud project.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var access = Ovh.CloudProjectDatabase.GetKafkaUserAccess.Invoke(new()
    {
        ServiceName = "XXX",
        ClusterId = "YYY",
        UserId = "ZZZ",
    });

    return new Dictionary<string, object?>
    {
        ["accessCert"] = access.Apply(getKafkaUserAccessResult => getKafkaUserAccessResult.Cert),
    };
});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/CloudProjectDatabase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		access, err := CloudProjectDatabase.GetKafkaUserAccess(ctx, &cloudprojectdatabase.GetKafkaUserAccessArgs{
			ServiceName: "XXX",
			ClusterId:   "YYY",
			UserId:      "ZZZ",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("accessCert", access.Cert)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProjectDatabase.CloudProjectDatabaseFunctions;
import com.pulumi.ovh.CloudProjectDatabase.inputs.GetKafkaUserAccessArgs;
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 access = CloudProjectDatabaseFunctions.getKafkaUserAccess(GetKafkaUserAccessArgs.builder()
            .serviceName("XXX")
            .clusterId("YYY")
            .userId("ZZZ")
            .build());

        ctx.export("accessCert", access.applyValue(getKafkaUserAccessResult -> getKafkaUserAccessResult.cert()));
    }
}
import pulumi
import pulumi_ovh as ovh

access = ovh.CloudProjectDatabase.get_kafka_user_access(service_name="XXX",
    cluster_id="YYY",
    user_id="ZZZ")
pulumi.export("accessCert", access.cert)
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const access = ovh.CloudProjectDatabase.getKafkaUserAccess({
    serviceName: "XXX",
    clusterId: "YYY",
    userId: "ZZZ",
});
export const accessCert = access.then(access => access.cert);
variables:
  access:
    fn::invoke:
      Function: ovh:CloudProjectDatabase:getKafkaUserAccess
      Arguments:
        serviceName: XXX
        clusterId: YYY
        userId: ZZZ
outputs:
  accessCert: ${access.cert}

Using getKafkaUserAccess

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 getKafkaUserAccess(args: GetKafkaUserAccessArgs, opts?: InvokeOptions): Promise<GetKafkaUserAccessResult>
function getKafkaUserAccessOutput(args: GetKafkaUserAccessOutputArgs, opts?: InvokeOptions): Output<GetKafkaUserAccessResult>
def get_kafka_user_access(cluster_id: Optional[str] = None,
                          service_name: Optional[str] = None,
                          user_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetKafkaUserAccessResult
def get_kafka_user_access_output(cluster_id: Optional[pulumi.Input[str]] = None,
                          service_name: Optional[pulumi.Input[str]] = None,
                          user_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetKafkaUserAccessResult]
func GetKafkaUserAccess(ctx *Context, args *GetKafkaUserAccessArgs, opts ...InvokeOption) (*GetKafkaUserAccessResult, error)
func GetKafkaUserAccessOutput(ctx *Context, args *GetKafkaUserAccessOutputArgs, opts ...InvokeOption) GetKafkaUserAccessResultOutput

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

public static class GetKafkaUserAccess 
{
    public static Task<GetKafkaUserAccessResult> InvokeAsync(GetKafkaUserAccessArgs args, InvokeOptions? opts = null)
    public static Output<GetKafkaUserAccessResult> Invoke(GetKafkaUserAccessInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKafkaUserAccessResult> getKafkaUserAccess(GetKafkaUserAccessArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: ovh:CloudProjectDatabase/getKafkaUserAccess:getKafkaUserAccess
  arguments:
    # arguments dictionary

The following arguments are supported:

ClusterId string

Cluster ID

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

UserId string

User ID

ClusterId string

Cluster ID

ServiceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

UserId string

User ID

clusterId String

Cluster ID

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

userId String

User ID

clusterId string

Cluster ID

serviceName string

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

userId string

User ID

cluster_id str

Cluster ID

service_name str

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

user_id str

User ID

clusterId String

Cluster ID

serviceName String

The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

userId String

User ID

getKafkaUserAccess Result

The following output properties are available:

Cert string

User cert.

ClusterId string

See Argument Reference above.

Id string

The provider-assigned unique ID for this managed resource.

Key string

(Sensitive) User key for the cert.

ServiceName string

See Argument Reference above.

UserId string

See Argument Reference above.

Cert string

User cert.

ClusterId string

See Argument Reference above.

Id string

The provider-assigned unique ID for this managed resource.

Key string

(Sensitive) User key for the cert.

ServiceName string

See Argument Reference above.

UserId string

See Argument Reference above.

cert String

User cert.

clusterId String

See Argument Reference above.

id String

The provider-assigned unique ID for this managed resource.

key String

(Sensitive) User key for the cert.

serviceName String

See Argument Reference above.

userId String

See Argument Reference above.

cert string

User cert.

clusterId string

See Argument Reference above.

id string

The provider-assigned unique ID for this managed resource.

key string

(Sensitive) User key for the cert.

serviceName string

See Argument Reference above.

userId string

See Argument Reference above.

cert str

User cert.

cluster_id str

See Argument Reference above.

id str

The provider-assigned unique ID for this managed resource.

key str

(Sensitive) User key for the cert.

service_name str

See Argument Reference above.

user_id str

See Argument Reference above.

cert String

User cert.

clusterId String

See Argument Reference above.

id String

The provider-assigned unique ID for this managed resource.

key String

(Sensitive) User key for the cert.

serviceName String

See Argument Reference above.

userId String

See Argument Reference above.

Package Details

Repository
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.