github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/output-funcs-tfbridge20/nodejs/getAmiIds.ts (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  import * as pulumi from "@pulumi/pulumi";
     5  import * as inputs from "./types/input";
     6  import * as outputs from "./types/output";
     7  import * as utilities from "./utilities";
     8  
     9  /**
    10   * Taken from pulumi-AWS to regress an issue
    11   */
    12  /** @deprecated aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds */
    13  export function getAmiIds(args: GetAmiIdsArgs, opts?: pulumi.InvokeOptions): Promise<GetAmiIdsResult> {
    14      pulumi.log.warn("getAmiIds is deprecated: aws.getAmiIds has been deprecated in favor of aws.ec2.getAmiIds")
    15  
    16      opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    17      return pulumi.runtime.invoke("mypkg::getAmiIds", {
    18          "executableUsers": args.executableUsers,
    19          "filters": args.filters,
    20          "nameRegex": args.nameRegex,
    21          "owners": args.owners,
    22          "sortAscending": args.sortAscending,
    23      }, opts);
    24  }
    25  
    26  /**
    27   * A collection of arguments for invoking getAmiIds.
    28   */
    29  export interface GetAmiIdsArgs {
    30      /**
    31       * Limit search to users with *explicit* launch
    32       * permission on  the image. Valid items are the numeric account ID or `self`.
    33       */
    34      executableUsers?: string[];
    35      /**
    36       * One or more name/value pairs to filter off of. There
    37       * are several valid keys, for a full reference, check out
    38       * [describe-images in the AWS CLI reference][1].
    39       */
    40      filters?: inputs.GetAmiIdsFilter[];
    41      /**
    42       * A regex string to apply to the AMI list returned
    43       * by AWS. This allows more advanced filtering not supported from the AWS API.
    44       * This filtering is done locally on what AWS returns, and could have a performance
    45       * impact if the result is large. It is recommended to combine this with other
    46       * options to narrow down the list AWS returns.
    47       */
    48      nameRegex?: string;
    49      /**
    50       * 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`).
    51       */
    52      owners: string[];
    53      /**
    54       * Used to sort AMIs by creation time.
    55       */
    56      sortAscending?: boolean;
    57  }
    58  
    59  /**
    60   * A collection of values returned by getAmiIds.
    61   */
    62  export interface GetAmiIdsResult {
    63      readonly executableUsers?: string[];
    64      readonly filters?: outputs.GetAmiIdsFilter[];
    65      /**
    66       * The provider-assigned unique ID for this managed resource.
    67       */
    68      readonly id: string;
    69      readonly ids: string[];
    70      readonly nameRegex?: string;
    71      readonly owners: string[];
    72      readonly sortAscending?: boolean;
    73  }
    74  
    75  export function getAmiIdsOutput(args: GetAmiIdsOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetAmiIdsResult> {
    76      return pulumi.output(args).apply(a => getAmiIds(a, opts))
    77  }
    78  
    79  /**
    80   * A collection of arguments for invoking getAmiIds.
    81   */
    82  export interface GetAmiIdsOutputArgs {
    83      /**
    84       * Limit search to users with *explicit* launch
    85       * permission on  the image. Valid items are the numeric account ID or `self`.
    86       */
    87      executableUsers?: pulumi.Input<pulumi.Input<string>[]>;
    88      /**
    89       * One or more name/value pairs to filter off of. There
    90       * are several valid keys, for a full reference, check out
    91       * [describe-images in the AWS CLI reference][1].
    92       */
    93      filters?: pulumi.Input<pulumi.Input<inputs.GetAmiIdsFilterArgs>[]>;
    94      /**
    95       * A regex string to apply to the AMI list returned
    96       * by AWS. This allows more advanced filtering not supported from the AWS API.
    97       * This filtering is done locally on what AWS returns, and could have a performance
    98       * impact if the result is large. It is recommended to combine this with other
    99       * options to narrow down the list AWS returns.
   100       */
   101      nameRegex?: pulumi.Input<string>;
   102      /**
   103       * 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`).
   104       */
   105      owners: pulumi.Input<pulumi.Input<string>[]>;
   106      /**
   107       * Used to sort AMIs by creation time.
   108       */
   109      sortAscending?: pulumi.Input<boolean>;
   110  }