Class AgentService
!> The consul..AgentService resource has been deprecated in version 2.0.0 of the provider
and will be removed in a future release. Please read the upgrade guide
for more information.
Provides access to the agent service data in Consul. This can be used to define a service associated with a particular agent. Currently, defining health checks for an agent service is not supported.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var app = new Consul.AgentService("app", new Consul.AgentServiceArgs
{
Address = "www.google.com",
Port = 80,
Tags =
{
"tag0",
"tag1",
},
});
}
}
Inherited Members
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class AgentService : CustomResource
Constructors
View SourceAgentService(String, AgentServiceArgs, CustomResourceOptions)
Create a AgentService resource with the given unique name, arguments, and options.
Declaration
public AgentService(string name, AgentServiceArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AgentServiceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAddress
The address of the service. Defaults to the address of the agent.
Declaration
public Output<string> Address { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the service.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Port
The port of the service.
Declaration
public Output<int?> Port { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Tags
A list of values that are opaque to Consul, but can be used to distinguish between services or nodes.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, AgentServiceState, CustomResourceOptions)
Get an existing AgentService resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AgentService Get(string name, Input<string> id, AgentServiceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AgentServiceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AgentService |