github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/transfer/getServer.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package transfer
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Use this data source to get the ARN of an AWS Transfer Server for use in other
    15  // resources.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/transfer"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := transfer.LookupServer(ctx, &transfer.LookupServerArgs{
    33  //				ServerId: "s-1234567",
    34  //			}, nil)
    35  //			if err != nil {
    36  //				return err
    37  //			}
    38  //			return nil
    39  //		})
    40  //	}
    41  //
    42  // ```
    43  // <!--End PulumiCodeChooser -->
    44  func LookupServer(ctx *pulumi.Context, args *LookupServerArgs, opts ...pulumi.InvokeOption) (*LookupServerResult, error) {
    45  	opts = internal.PkgInvokeDefaultOpts(opts)
    46  	var rv LookupServerResult
    47  	err := ctx.Invoke("aws:transfer/getServer:getServer", args, &rv, opts...)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return &rv, nil
    52  }
    53  
    54  // A collection of arguments for invoking getServer.
    55  type LookupServerArgs struct {
    56  	// ID for an SFTP server.
    57  	ServerId string `pulumi:"serverId"`
    58  }
    59  
    60  // A collection of values returned by getServer.
    61  type LookupServerResult struct {
    62  	// ARN of Transfer Server.
    63  	Arn string `pulumi:"arn"`
    64  	// ARN of any certificate.
    65  	Certificate string `pulumi:"certificate"`
    66  	// The domain of the storage system that is used for file transfers.
    67  	Domain string `pulumi:"domain"`
    68  	// Endpoint of the Transfer Server (e.g., `s-12345678.server.transfer.REGION.amazonaws.com`).
    69  	Endpoint string `pulumi:"endpoint"`
    70  	// Type of endpoint that the server is connected to.
    71  	EndpointType string `pulumi:"endpointType"`
    72  	// The provider-assigned unique ID for this managed resource.
    73  	Id string `pulumi:"id"`
    74  	// The mode of authentication enabled for this service. The default value is `SERVICE_MANAGED`, which allows you to store and access SFTP user credentials within the service. `API_GATEWAY` indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.
    75  	IdentityProviderType string `pulumi:"identityProviderType"`
    76  	// ARN of the IAM role used to authenticate the user account with an `identityProviderType` of `API_GATEWAY`.
    77  	InvocationRole string `pulumi:"invocationRole"`
    78  	// ARN of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
    79  	LoggingRole string `pulumi:"loggingRole"`
    80  	// File transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint.
    81  	Protocols []string `pulumi:"protocols"`
    82  	// The name of the security policy that is attached to the server.
    83  	SecurityPolicyName string `pulumi:"securityPolicyName"`
    84  	ServerId           string `pulumi:"serverId"`
    85  	// A set of ARNs of destinations that will receive structured logs from the transfer server such as CloudWatch Log Group ARNs.
    86  	StructuredLogDestinations []string `pulumi:"structuredLogDestinations"`
    87  	// URL of the service endpoint used to authenticate users with an `identityProviderType` of `API_GATEWAY`.
    88  	Url string `pulumi:"url"`
    89  }
    90  
    91  func LookupServerOutput(ctx *pulumi.Context, args LookupServerOutputArgs, opts ...pulumi.InvokeOption) LookupServerResultOutput {
    92  	return pulumi.ToOutputWithContext(context.Background(), args).
    93  		ApplyT(func(v interface{}) (LookupServerResult, error) {
    94  			args := v.(LookupServerArgs)
    95  			r, err := LookupServer(ctx, &args, opts...)
    96  			var s LookupServerResult
    97  			if r != nil {
    98  				s = *r
    99  			}
   100  			return s, err
   101  		}).(LookupServerResultOutput)
   102  }
   103  
   104  // A collection of arguments for invoking getServer.
   105  type LookupServerOutputArgs struct {
   106  	// ID for an SFTP server.
   107  	ServerId pulumi.StringInput `pulumi:"serverId"`
   108  }
   109  
   110  func (LookupServerOutputArgs) ElementType() reflect.Type {
   111  	return reflect.TypeOf((*LookupServerArgs)(nil)).Elem()
   112  }
   113  
   114  // A collection of values returned by getServer.
   115  type LookupServerResultOutput struct{ *pulumi.OutputState }
   116  
   117  func (LookupServerResultOutput) ElementType() reflect.Type {
   118  	return reflect.TypeOf((*LookupServerResult)(nil)).Elem()
   119  }
   120  
   121  func (o LookupServerResultOutput) ToLookupServerResultOutput() LookupServerResultOutput {
   122  	return o
   123  }
   124  
   125  func (o LookupServerResultOutput) ToLookupServerResultOutputWithContext(ctx context.Context) LookupServerResultOutput {
   126  	return o
   127  }
   128  
   129  // ARN of Transfer Server.
   130  func (o LookupServerResultOutput) Arn() pulumi.StringOutput {
   131  	return o.ApplyT(func(v LookupServerResult) string { return v.Arn }).(pulumi.StringOutput)
   132  }
   133  
   134  // ARN of any certificate.
   135  func (o LookupServerResultOutput) Certificate() pulumi.StringOutput {
   136  	return o.ApplyT(func(v LookupServerResult) string { return v.Certificate }).(pulumi.StringOutput)
   137  }
   138  
   139  // The domain of the storage system that is used for file transfers.
   140  func (o LookupServerResultOutput) Domain() pulumi.StringOutput {
   141  	return o.ApplyT(func(v LookupServerResult) string { return v.Domain }).(pulumi.StringOutput)
   142  }
   143  
   144  // Endpoint of the Transfer Server (e.g., `s-12345678.server.transfer.REGION.amazonaws.com`).
   145  func (o LookupServerResultOutput) Endpoint() pulumi.StringOutput {
   146  	return o.ApplyT(func(v LookupServerResult) string { return v.Endpoint }).(pulumi.StringOutput)
   147  }
   148  
   149  // Type of endpoint that the server is connected to.
   150  func (o LookupServerResultOutput) EndpointType() pulumi.StringOutput {
   151  	return o.ApplyT(func(v LookupServerResult) string { return v.EndpointType }).(pulumi.StringOutput)
   152  }
   153  
   154  // The provider-assigned unique ID for this managed resource.
   155  func (o LookupServerResultOutput) Id() pulumi.StringOutput {
   156  	return o.ApplyT(func(v LookupServerResult) string { return v.Id }).(pulumi.StringOutput)
   157  }
   158  
   159  // The mode of authentication enabled for this service. The default value is `SERVICE_MANAGED`, which allows you to store and access SFTP user credentials within the service. `API_GATEWAY` indicates that user authentication requires a call to an API Gateway endpoint URL provided by you to integrate an identity provider of your choice.
   160  func (o LookupServerResultOutput) IdentityProviderType() pulumi.StringOutput {
   161  	return o.ApplyT(func(v LookupServerResult) string { return v.IdentityProviderType }).(pulumi.StringOutput)
   162  }
   163  
   164  // ARN of the IAM role used to authenticate the user account with an `identityProviderType` of `API_GATEWAY`.
   165  func (o LookupServerResultOutput) InvocationRole() pulumi.StringOutput {
   166  	return o.ApplyT(func(v LookupServerResult) string { return v.InvocationRole }).(pulumi.StringOutput)
   167  }
   168  
   169  // ARN of an IAM role that allows the service to write your SFTP users’ activity to your Amazon CloudWatch logs for monitoring and auditing purposes.
   170  func (o LookupServerResultOutput) LoggingRole() pulumi.StringOutput {
   171  	return o.ApplyT(func(v LookupServerResult) string { return v.LoggingRole }).(pulumi.StringOutput)
   172  }
   173  
   174  // File transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint.
   175  func (o LookupServerResultOutput) Protocols() pulumi.StringArrayOutput {
   176  	return o.ApplyT(func(v LookupServerResult) []string { return v.Protocols }).(pulumi.StringArrayOutput)
   177  }
   178  
   179  // The name of the security policy that is attached to the server.
   180  func (o LookupServerResultOutput) SecurityPolicyName() pulumi.StringOutput {
   181  	return o.ApplyT(func(v LookupServerResult) string { return v.SecurityPolicyName }).(pulumi.StringOutput)
   182  }
   183  
   184  func (o LookupServerResultOutput) ServerId() pulumi.StringOutput {
   185  	return o.ApplyT(func(v LookupServerResult) string { return v.ServerId }).(pulumi.StringOutput)
   186  }
   187  
   188  // A set of ARNs of destinations that will receive structured logs from the transfer server such as CloudWatch Log Group ARNs.
   189  func (o LookupServerResultOutput) StructuredLogDestinations() pulumi.StringArrayOutput {
   190  	return o.ApplyT(func(v LookupServerResult) []string { return v.StructuredLogDestinations }).(pulumi.StringArrayOutput)
   191  }
   192  
   193  // URL of the service endpoint used to authenticate users with an `identityProviderType` of `API_GATEWAY`.
   194  func (o LookupServerResultOutput) Url() pulumi.StringOutput {
   195  	return o.ApplyT(func(v LookupServerResult) string { return v.Url }).(pulumi.StringOutput)
   196  }
   197  
   198  func init() {
   199  	pulumi.RegisterOutputType(LookupServerResultOutput{})
   200  }