1. Packages
  2. Aiven
  3. API Docs
  4. getServiceComponent
Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi

aiven.getServiceComponent

Explore with Pulumi AI

aiven logo
Aiven v6.18.0 published on Thursday, Jun 27, 2024 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",
    });
    
    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")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      sc1:
        fn::invoke:
          Function: aiven:getServiceComponent
          Arguments:
            project: ${project1.project}
            serviceName: ${service1.serviceName}
            component: kafka
            route: dynamic
            kafkaAuthenticationMethod: certificate
    

    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>
    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]
    func GetServiceComponent(ctx *Context, args *GetServiceComponentArgs, opts ...InvokeOption) (*GetServiceComponentResult, error)
    func GetServiceComponentOutput(ctx *Context, args *GetServiceComponentOutputArgs, opts ...InvokeOption) GetServiceComponentResultOutput

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

    The following arguments are supported:

    Component string
    Service component name
    Project string
    Project name
    KafkaAuthenticationMethod string
    Kafka authentication method. This is a value specific to the 'kafka' service component
    Route string
    Network access route
    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
    Component string
    Service component name
    Project string
    Project name
    KafkaAuthenticationMethod string
    Kafka authentication method. This is a value specific to the 'kafka' service component
    Route string
    Network access route
    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
    component String
    Service component name
    project String
    Project name
    kafkaAuthenticationMethod String
    Kafka authentication method. This is a value specific to the 'kafka' service component
    route String
    Network access route
    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
    component string
    Service component name
    project string
    Project name
    kafkaAuthenticationMethod string
    Kafka authentication method. This is a value specific to the 'kafka' service component
    route string
    Network access route
    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
    component str
    Service component name
    project str
    Project name
    kafka_authentication_method str
    Kafka authentication method. This is a value specific to the 'kafka' service component
    route str
    Network access route
    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
    component String
    Service component name
    project String
    Project name
    kafkaAuthenticationMethod String
    Kafka authentication method. This is a value specific to the 'kafka' service component
    route String
    Network access route
    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

    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.
    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
    Route string
    Network access route
    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
    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.
    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
    Route string
    Network access route
    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
    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.
    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
    route String
    Network access route
    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
    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.
    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
    route string
    Network access route
    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
    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.
    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
    route str
    Network access route
    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
    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.
    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
    route String
    Network access route
    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

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.18.0 published on Thursday, Jun 27, 2024 by Pulumi