github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/output-funcs-tfbridge20/dotnet/GetAmiIds.cs (about) 1 // *** WARNING: this file was generated by test. *** 2 // *** Do not edit by hand unless you're certain you know what you are doing! *** 3 4 using System; 5 using System.Collections.Generic; 6 using System.Collections.Immutable; 7 using System.Threading.Tasks; 8 using Pulumi.Serialization; 9 10 namespace Pulumi.Mypkg 11 { 12 [Obsolete(@"aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds")] 13 public static class GetAmiIds 14 { 15 /// <summary> 16 /// Taken from pulumi-AWS to regress an issue 17 /// </summary> 18 public static Task<GetAmiIdsResult> InvokeAsync(GetAmiIdsArgs args, InvokeOptions? options = null) 19 => global::Pulumi.Deployment.Instance.InvokeAsync<GetAmiIdsResult>("mypkg::getAmiIds", args ?? new GetAmiIdsArgs(), options.WithDefaults()); 20 21 /// <summary> 22 /// Taken from pulumi-AWS to regress an issue 23 /// </summary> 24 public static Output<GetAmiIdsResult> Invoke(GetAmiIdsInvokeArgs args, InvokeOptions? options = null) 25 => global::Pulumi.Deployment.Instance.Invoke<GetAmiIdsResult>("mypkg::getAmiIds", args ?? new GetAmiIdsInvokeArgs(), options.WithDefaults()); 26 } 27 28 29 public sealed class GetAmiIdsArgs : global::Pulumi.InvokeArgs 30 { 31 [Input("executableUsers")] 32 private List<string>? _executableUsers; 33 34 /// <summary> 35 /// Limit search to users with *explicit* launch 36 /// permission on the image. Valid items are the numeric account ID or `self`. 37 /// </summary> 38 public List<string> ExecutableUsers 39 { 40 get => _executableUsers ?? (_executableUsers = new List<string>()); 41 set => _executableUsers = value; 42 } 43 44 [Input("filters")] 45 private List<Inputs.GetAmiIdsFilterArgs>? _filters; 46 47 /// <summary> 48 /// One or more name/value pairs to filter off of. There 49 /// are several valid keys, for a full reference, check out 50 /// [describe-images in the AWS CLI reference][1]. 51 /// </summary> 52 public List<Inputs.GetAmiIdsFilterArgs> Filters 53 { 54 get => _filters ?? (_filters = new List<Inputs.GetAmiIdsFilterArgs>()); 55 set => _filters = value; 56 } 57 58 /// <summary> 59 /// A regex string to apply to the AMI list returned 60 /// by AWS. This allows more advanced filtering not supported from the AWS API. 61 /// This filtering is done locally on what AWS returns, and could have a performance 62 /// impact if the result is large. It is recommended to combine this with other 63 /// options to narrow down the list AWS returns. 64 /// </summary> 65 [Input("nameRegex")] 66 public string? NameRegex { get; set; } 67 68 [Input("owners", required: true)] 69 private List<string>? _owners; 70 71 /// <summary> 72 /// List of AMI owners to limit search. At least 1 value must be specified. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g. `amazon`, `aws-marketplace`, `microsoft`). 73 /// </summary> 74 public List<string> Owners 75 { 76 get => _owners ?? (_owners = new List<string>()); 77 set => _owners = value; 78 } 79 80 /// <summary> 81 /// Used to sort AMIs by creation time. 82 /// </summary> 83 [Input("sortAscending")] 84 public bool? SortAscending { get; set; } 85 86 public GetAmiIdsArgs() 87 { 88 } 89 public static new GetAmiIdsArgs Empty => new GetAmiIdsArgs(); 90 } 91 92 public sealed class GetAmiIdsInvokeArgs : global::Pulumi.InvokeArgs 93 { 94 [Input("executableUsers")] 95 private InputList<string>? _executableUsers; 96 97 /// <summary> 98 /// Limit search to users with *explicit* launch 99 /// permission on the image. Valid items are the numeric account ID or `self`. 100 /// </summary> 101 public InputList<string> ExecutableUsers 102 { 103 get => _executableUsers ?? (_executableUsers = new InputList<string>()); 104 set => _executableUsers = value; 105 } 106 107 [Input("filters")] 108 private InputList<Inputs.GetAmiIdsFilterInputArgs>? _filters; 109 110 /// <summary> 111 /// One or more name/value pairs to filter off of. There 112 /// are several valid keys, for a full reference, check out 113 /// [describe-images in the AWS CLI reference][1]. 114 /// </summary> 115 public InputList<Inputs.GetAmiIdsFilterInputArgs> Filters 116 { 117 get => _filters ?? (_filters = new InputList<Inputs.GetAmiIdsFilterInputArgs>()); 118 set => _filters = value; 119 } 120 121 /// <summary> 122 /// A regex string to apply to the AMI list returned 123 /// by AWS. This allows more advanced filtering not supported from the AWS API. 124 /// This filtering is done locally on what AWS returns, and could have a performance 125 /// impact if the result is large. It is recommended to combine this with other 126 /// options to narrow down the list AWS returns. 127 /// </summary> 128 [Input("nameRegex")] 129 public Input<string>? NameRegex { get; set; } 130 131 [Input("owners", required: true)] 132 private InputList<string>? _owners; 133 134 /// <summary> 135 /// List of AMI owners to limit search. At least 1 value must be specified. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g. `amazon`, `aws-marketplace`, `microsoft`). 136 /// </summary> 137 public InputList<string> Owners 138 { 139 get => _owners ?? (_owners = new InputList<string>()); 140 set => _owners = value; 141 } 142 143 /// <summary> 144 /// Used to sort AMIs by creation time. 145 /// </summary> 146 [Input("sortAscending")] 147 public Input<bool>? SortAscending { get; set; } 148 149 public GetAmiIdsInvokeArgs() 150 { 151 } 152 public static new GetAmiIdsInvokeArgs Empty => new GetAmiIdsInvokeArgs(); 153 } 154 155 156 [OutputType] 157 public sealed class GetAmiIdsResult 158 { 159 public readonly ImmutableArray<string> ExecutableUsers; 160 public readonly ImmutableArray<Outputs.GetAmiIdsFilterResult> Filters; 161 /// <summary> 162 /// The provider-assigned unique ID for this managed resource. 163 /// </summary> 164 public readonly string Id; 165 public readonly ImmutableArray<string> Ids; 166 public readonly string? NameRegex; 167 public readonly ImmutableArray<string> Owners; 168 public readonly bool? SortAscending; 169 170 [OutputConstructor] 171 private GetAmiIdsResult( 172 ImmutableArray<string> executableUsers, 173 174 ImmutableArray<Outputs.GetAmiIdsFilterResult> filters, 175 176 string id, 177 178 ImmutableArray<string> ids, 179 180 string? nameRegex, 181 182 ImmutableArray<string> owners, 183 184 bool? sortAscending) 185 { 186 ExecutableUsers = executableUsers; 187 Filters = filters; 188 Id = id; 189 Ids = ids; 190 NameRegex = nameRegex; 191 Owners = owners; 192 SortAscending = sortAscending; 193 } 194 } 195 }