1. Packages
  2. Aiven Provider
  3. API Docs
  4. getServiceComponent
Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi

aiven.getServiceComponent

Explore with Pulumi AI

Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi

The Service Component data source provides information about the existing Aiven service Component.

Service components can be defined to get the connection info for specific service. Services may support multiple different access routes (VPC peering and public access), have additional components or support various authentication methods. Each of these may be represented by different DNS name or TCP port and the specific component to match can be selected by specifying appropriate filters as shown below.

Example Usage

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

const sc1 = aiven.getServiceComponent({
    project: project1.project,
    serviceName: service1.serviceName,
    component: "kafka",
    route: "dynamic",
    kafkaAuthenticationMethod: "certificate",
});
Copy
import pulumi
import pulumi_aiven as aiven

sc1 = aiven.get_service_component(project=project1["project"],
    service_name=service1["serviceName"],
    component="kafka",
    route="dynamic",
    kafka_authentication_method="certificate")
Copy
package main

import (
	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aiven.GetServiceComponent(ctx, &aiven.GetServiceComponentArgs{
			Project:                   project1.Project,
			ServiceName:               pulumi.StringRef(service1.ServiceName),
			Component:                 "kafka",
			Route:                     pulumi.StringRef("dynamic"),
			KafkaAuthenticationMethod: pulumi.StringRef("certificate"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;

return await Deployment.RunAsync(() => 
{
    var sc1 = Aiven.GetServiceComponent.Invoke(new()
    {
        Project = project1.Project,
        ServiceName = service1.ServiceName,
        Component = "kafka",
        Route = "dynamic",
        KafkaAuthenticationMethod = "certificate",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.AivenFunctions;
import com.pulumi.aiven.inputs.GetServiceComponentArgs;
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 sc1 = AivenFunctions.getServiceComponent(GetServiceComponentArgs.builder()
            .project(project1.project())
            .serviceName(service1.serviceName())
            .component("kafka")
            .route("dynamic")
            .kafkaAuthenticationMethod("certificate")
            .build());

    }
}
Copy
variables:
  sc1:
    fn::invoke:
      function: aiven:getServiceComponent
      arguments:
        project: ${project1.project}
        serviceName: ${service1.serviceName}
        component: kafka
        route: dynamic
        kafkaAuthenticationMethod: certificate
Copy

Using getServiceComponent

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 getServiceComponent(args: GetServiceComponentArgs, opts?: InvokeOptions): Promise<GetServiceComponentResult>
function getServiceComponentOutput(args: GetServiceComponentOutputArgs, opts?: InvokeOptions): Output<GetServiceComponentResult>
Copy
def get_service_component(component: Optional[str] = None,
                          kafka_authentication_method: Optional[str] = None,
                          project: Optional[str] = None,
                          route: Optional[str] = None,
                          service_name: Optional[str] = None,
                          ssl: Optional[bool] = None,
                          usage: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetServiceComponentResult
def get_service_component_output(component: Optional[pulumi.Input[str]] = None,
                          kafka_authentication_method: Optional[pulumi.Input[str]] = None,
                          project: Optional[pulumi.Input[str]] = None,
                          route: Optional[pulumi.Input[str]] = None,
                          service_name: Optional[pulumi.Input[str]] = None,
                          ssl: Optional[pulumi.Input[bool]] = None,
                          usage: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetServiceComponentResult]
Copy
func GetServiceComponent(ctx *Context, args *GetServiceComponentArgs, opts ...InvokeOption) (*GetServiceComponentResult, error)
func GetServiceComponentOutput(ctx *Context, args *GetServiceComponentOutputArgs, opts ...InvokeOption) GetServiceComponentResultOutput
Copy

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

public static class GetServiceComponent 
{
    public static Task<GetServiceComponentResult> InvokeAsync(GetServiceComponentArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceComponentResult> Invoke(GetServiceComponentInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServiceComponentResult> getServiceComponent(GetServiceComponentArgs args, InvokeOptions options)
public static Output<GetServiceComponentResult> getServiceComponent(GetServiceComponentArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aiven:index/getServiceComponent:getServiceComponent
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Component This property is required. string
Service component name
Project This property is required. string
Project name
KafkaAuthenticationMethod string
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
Route string
Network access route. The possible values are dynamic, private, privatelink and public.
ServiceName string
Service name
Ssl bool
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
Usage string
DNS usage name. The possible values are disaster_recovery, primary and replica.
Component This property is required. string
Service component name
Project This property is required. string
Project name
KafkaAuthenticationMethod string
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
Route string
Network access route. The possible values are dynamic, private, privatelink and public.
ServiceName string
Service name
Ssl bool
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
Usage string
DNS usage name. The possible values are disaster_recovery, primary and replica.
component This property is required. String
Service component name
project This property is required. String
Project name
kafkaAuthenticationMethod String
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route String
Network access route. The possible values are dynamic, private, privatelink and public.
serviceName String
Service name
ssl Boolean
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage String
DNS usage name. The possible values are disaster_recovery, primary and replica.
component This property is required. string
Service component name
project This property is required. string
Project name
kafkaAuthenticationMethod string
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route string
Network access route. The possible values are dynamic, private, privatelink and public.
serviceName string
Service name
ssl boolean
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage string
DNS usage name. The possible values are disaster_recovery, primary and replica.
component This property is required. str
Service component name
project This property is required. str
Project name
kafka_authentication_method str
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route str
Network access route. The possible values are dynamic, private, privatelink and public.
service_name str
Service name
ssl bool
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage str
DNS usage name. The possible values are disaster_recovery, primary and replica.
component This property is required. String
Service component name
project This property is required. String
Project name
kafkaAuthenticationMethod String
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route String
Network access route. The possible values are dynamic, private, privatelink and public.
serviceName String
Service name
ssl Boolean
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage String
DNS usage name. The possible values are disaster_recovery, primary and replica.

getServiceComponent Result

The following output properties are available:

Component string
Service component name
Host string
DNS name for connecting to the service component
Id string
The provider-assigned unique ID for this managed resource.
KafkaSslCa string
Kafka certificate used. The possible values are letsencrypt and project_ca.
Port int
Port number for connecting to the service component
Project string
Project name
KafkaAuthenticationMethod string
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
Route string
Network access route. The possible values are dynamic, private, privatelink and public.
ServiceName string
Service name
Ssl bool
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
Usage string
DNS usage name. The possible values are disaster_recovery, primary and replica.
Component string
Service component name
Host string
DNS name for connecting to the service component
Id string
The provider-assigned unique ID for this managed resource.
KafkaSslCa string
Kafka certificate used. The possible values are letsencrypt and project_ca.
Port int
Port number for connecting to the service component
Project string
Project name
KafkaAuthenticationMethod string
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
Route string
Network access route. The possible values are dynamic, private, privatelink and public.
ServiceName string
Service name
Ssl bool
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
Usage string
DNS usage name. The possible values are disaster_recovery, primary and replica.
component String
Service component name
host String
DNS name for connecting to the service component
id String
The provider-assigned unique ID for this managed resource.
kafkaSslCa String
Kafka certificate used. The possible values are letsencrypt and project_ca.
port Integer
Port number for connecting to the service component
project String
Project name
kafkaAuthenticationMethod String
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route String
Network access route. The possible values are dynamic, private, privatelink and public.
serviceName String
Service name
ssl Boolean
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage String
DNS usage name. The possible values are disaster_recovery, primary and replica.
component string
Service component name
host string
DNS name for connecting to the service component
id string
The provider-assigned unique ID for this managed resource.
kafkaSslCa string
Kafka certificate used. The possible values are letsencrypt and project_ca.
port number
Port number for connecting to the service component
project string
Project name
kafkaAuthenticationMethod string
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route string
Network access route. The possible values are dynamic, private, privatelink and public.
serviceName string
Service name
ssl boolean
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage string
DNS usage name. The possible values are disaster_recovery, primary and replica.
component str
Service component name
host str
DNS name for connecting to the service component
id str
The provider-assigned unique ID for this managed resource.
kafka_ssl_ca str
Kafka certificate used. The possible values are letsencrypt and project_ca.
port int
Port number for connecting to the service component
project str
Project name
kafka_authentication_method str
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route str
Network access route. The possible values are dynamic, private, privatelink and public.
service_name str
Service name
ssl bool
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage str
DNS usage name. The possible values are disaster_recovery, primary and replica.
component String
Service component name
host String
DNS name for connecting to the service component
id String
The provider-assigned unique ID for this managed resource.
kafkaSslCa String
Kafka certificate used. The possible values are letsencrypt and project_ca.
port Number
Port number for connecting to the service component
project String
Project name
kafkaAuthenticationMethod String
Kafka authentication method. This is a value specific to the 'kafka' service component. The possible values are certificate and sasl.
route String
Network access route. The possible values are dynamic, private, privatelink and public.
serviceName String
Service name
ssl Boolean
Whether the endpoint is encrypted or accepts plaintext. By default endpoints are always encrypted and this property is only included for service components that may disable encryption
usage String
DNS usage name. The possible values are disaster_recovery, primary and replica.

Package Details

Repository
Aiven pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.
Aiven v6.37.0 published on Thursday, Apr 10, 2025 by Pulumi