AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.servicediscovery.getService
Explore with Pulumi AI
Retrieves information about a Service Discovery Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = aws.servicediscovery.getService({
name: "example",
namespaceId: "NAMESPACE_ID_VALUE",
});
import pulumi
import pulumi_aws as aws
test = aws.servicediscovery.get_service(name="example",
namespace_id="NAMESPACE_ID_VALUE")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicediscovery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicediscovery.LookupService(ctx, &servicediscovery.LookupServiceArgs{
Name: "example",
NamespaceId: "NAMESPACE_ID_VALUE",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = Aws.ServiceDiscovery.GetService.Invoke(new()
{
Name = "example",
NamespaceId = "NAMESPACE_ID_VALUE",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.servicediscovery.ServicediscoveryFunctions;
import com.pulumi.aws.servicediscovery.inputs.GetServiceArgs;
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 test = ServicediscoveryFunctions.getService(GetServiceArgs.builder()
.name("example")
.namespaceId("NAMESPACE_ID_VALUE")
.build());
}
}
variables:
test:
fn::invoke:
Function: aws:servicediscovery:getService
Arguments:
name: example
namespaceId: NAMESPACE_ID_VALUE
Using getService
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 getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function getServiceOutput(args: GetServiceOutputArgs, opts?: InvokeOptions): Output<GetServiceResult>
def get_service(name: Optional[str] = None,
namespace_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceResult
def get_service_output(name: Optional[pulumi.Input[str]] = None,
namespace_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceResult]
func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)
func LookupServiceOutput(ctx *Context, args *LookupServiceOutputArgs, opts ...InvokeOption) LookupServiceResultOutput
> Note: This function is named LookupService
in the Go SDK.
public static class GetService
{
public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:servicediscovery/getService:getService
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Name of the service.
- Namespace
Id string - ID of the namespace that the service belongs to.
- Dictionary<string, string>
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Name string
- Name of the service.
- Namespace
Id string - ID of the namespace that the service belongs to.
- map[string]string
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- name String
- Name of the service.
- namespace
Id String - ID of the namespace that the service belongs to.
- Map<String,String>
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- name string
- Name of the service.
- namespace
Id string - ID of the namespace that the service belongs to.
- {[key: string]: string}
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- name str
- Name of the service.
- namespace_
id str - ID of the namespace that the service belongs to.
- Mapping[str, str]
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- name String
- Name of the service.
- namespace
Id String - ID of the namespace that the service belongs to.
- Map<String>
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
getService Result
The following output properties are available:
- Arn string
- ARN of the service.
- Description string
- Description of the service.
- Dns
Configs List<GetService Dns Config> - Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See
dns_config
Block for details. - Health
Check List<GetConfigs Service Health Check Config> - Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See
health_check_config
Block for details. - Health
Check List<GetCustom Configs Service Health Check Custom Config> - A complex type that contains settings for ECS managed health checks. See
health_check_custom_config
Block for details. - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Namespace
Id string - ID of the namespace to use for DNS configuration.
- Dictionary<string, string>
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Dictionary<string, string>
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Arn string
- ARN of the service.
- Description string
- Description of the service.
- Dns
Configs []GetService Dns Config - Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See
dns_config
Block for details. - Health
Check []GetConfigs Service Health Check Config - Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See
health_check_config
Block for details. - Health
Check []GetCustom Configs Service Health Check Custom Config - A complex type that contains settings for ECS managed health checks. See
health_check_custom_config
Block for details. - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Namespace
Id string - ID of the namespace to use for DNS configuration.
- map[string]string
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - map[string]string
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- arn String
- ARN of the service.
- description String
- Description of the service.
- dns
Configs List<GetService Dns Config> - Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See
dns_config
Block for details. - health
Check List<GetConfigs Service Health Check Config> - Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See
health_check_config
Block for details. - health
Check List<GetCustom Configs Service Health Check Custom Config> - A complex type that contains settings for ECS managed health checks. See
health_check_custom_config
Block for details. - id String
- The provider-assigned unique ID for this managed resource.
- name String
- namespace
Id String - ID of the namespace to use for DNS configuration.
- Map<String,String>
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Map<String,String>
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- arn string
- ARN of the service.
- description string
- Description of the service.
- dns
Configs GetService Dns Config[] - Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See
dns_config
Block for details. - health
Check GetConfigs Service Health Check Config[] - Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See
health_check_config
Block for details. - health
Check GetCustom Configs Service Health Check Custom Config[] - A complex type that contains settings for ECS managed health checks. See
health_check_custom_config
Block for details. - id string
- The provider-assigned unique ID for this managed resource.
- name string
- namespace
Id string - ID of the namespace to use for DNS configuration.
- {[key: string]: string}
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - {[key: string]: string}
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- arn str
- ARN of the service.
- description str
- Description of the service.
- dns_
configs Sequence[GetService Dns Config] - Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See
dns_config
Block for details. - health_
check_ Sequence[Getconfigs Service Health Check Config] - Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See
health_check_config
Block for details. - health_
check_ Sequence[Getcustom_ configs Service Health Check Custom Config] - A complex type that contains settings for ECS managed health checks. See
health_check_custom_config
Block for details. - id str
- The provider-assigned unique ID for this managed resource.
- name str
- namespace_
id str - ID of the namespace to use for DNS configuration.
- Mapping[str, str]
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Mapping[str, str]
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- arn String
- ARN of the service.
- description String
- Description of the service.
- dns
Configs List<Property Map> - Complex type that contains information about the resource record sets that you want Amazon Route 53 to create when you register an instance. See
dns_config
Block for details. - health
Check List<Property Map>Configs - Complex type that contains settings for an optional health check. Only for Public DNS namespaces. See
health_check_config
Block for details. - health
Check List<Property Map>Custom Configs - A complex type that contains settings for ECS managed health checks. See
health_check_custom_config
Block for details. - id String
- The provider-assigned unique ID for this managed resource.
- name String
- namespace
Id String - ID of the namespace to use for DNS configuration.
- Map<String>
- (Deprecated) Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Map<String>
- Map of tags to assign to the service. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Supporting Types
GetServiceDnsConfig
- Dns
Records List<GetService Dns Config Dns Record> - An array that contains one DnsRecord object for each resource record set. See
dns_records
Block for details. - Namespace
Id string - ID of the namespace that the service belongs to.
- Routing
Policy string - Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
- Dns
Records []GetService Dns Config Dns Record - An array that contains one DnsRecord object for each resource record set. See
dns_records
Block for details. - Namespace
Id string - ID of the namespace that the service belongs to.
- Routing
Policy string - Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
- dns
Records List<GetService Dns Config Dns Record> - An array that contains one DnsRecord object for each resource record set. See
dns_records
Block for details. - namespace
Id String - ID of the namespace that the service belongs to.
- routing
Policy String - Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
- dns
Records GetService Dns Config Dns Record[] - An array that contains one DnsRecord object for each resource record set. See
dns_records
Block for details. - namespace
Id string - ID of the namespace that the service belongs to.
- routing
Policy string - Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
- dns_
records Sequence[GetService Dns Config Dns Record] - An array that contains one DnsRecord object for each resource record set. See
dns_records
Block for details. - namespace_
id str - ID of the namespace that the service belongs to.
- routing_
policy str - Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
- dns
Records List<Property Map> - An array that contains one DnsRecord object for each resource record set. See
dns_records
Block for details. - namespace
Id String - ID of the namespace that the service belongs to.
- routing
Policy String - Routing policy that you want to apply to all records that Route 53 creates when you register an instance and specify the service. Valid Values: MULTIVALUE, WEIGHTED
GetServiceDnsConfigDnsRecord
GetServiceHealthCheckConfig
- Failure
Threshold int - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- Resource
Path string - Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
- Type string
- The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
- Failure
Threshold int - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- Resource
Path string - Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
- Type string
- The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
- failure
Threshold Integer - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- resource
Path String - Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
- type String
- The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
- failure
Threshold number - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- resource
Path string - Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
- type string
- The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
- failure_
threshold int - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- resource_
path str - Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
- type str
- The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
- failure
Threshold Number - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- resource
Path String - Path that you want Route 53 to request when performing health checks. Route 53 automatically adds the DNS name for the service. If you don't specify a value, the default value is /.
- type String
- The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. Valid Values: HTTP, HTTPS, TCP
GetServiceHealthCheckCustomConfig
- Failure
Threshold int - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- Failure
Threshold int - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- failure
Threshold Integer - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- failure
Threshold number - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- failure_
threshold int - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
- failure
Threshold Number - The number of 30-second intervals that you want service discovery to wait before it changes the health status of a service instance. Maximum value of 10.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.