Class ScheduledQuery


  • public class ScheduledQuery
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS Timestream Query Scheduled Query. ## Example Usage ### Basic Usage Before creating a scheduled query, you must have a source database and table with ingested data. Below is a multi-step example, providing an opportunity for data ingestion. If your infrastructure is already set up—including the source database and table with data, results database and table, error report S3 bucket, SNS topic, and IAM role—you can create a scheduled query as follows:
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.timestreamquery.ScheduledQuery;
     import com.pulumi.aws.timestreamquery.ScheduledQueryArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationSnsConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryScheduleConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var example = new ScheduledQuery("example", ScheduledQueryArgs.builder()
                 .errorReportConfiguration(ScheduledQueryErrorReportConfigurationArgs.builder()
                     .s3Configuration(ScheduledQueryErrorReportConfigurationS3ConfigurationArgs.builder()
                         .bucketName(exampleAwsS3Bucket.bucket())
                         .build())
                     .build())
                 .notificationConfiguration(ScheduledQueryNotificationConfigurationArgs.builder()
                     .snsConfiguration(ScheduledQueryNotificationConfigurationSnsConfigurationArgs.builder()
                         .topicArn(exampleAwsSnsTopic.arn())
                         .build())
                     .build())
                 .scheduleConfiguration(ScheduledQueryScheduleConfigurationArgs.builder()
                     .scheduleExpression("rate(1 hour)")
                     .build())
                 .targetConfiguration(ScheduledQueryTargetConfigurationArgs.builder()
                     .timestreamConfiguration(ScheduledQueryTargetConfigurationTimestreamConfigurationArgs.builder()
                         .multiMeasureMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs.builder()
                             .multiMeasureAttributeMappings(                        
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("avg_cpu_utilization")
                                     .build(),
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("p90_cpu_utilization")
                                     .build(),
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("p95_cpu_utilization")
                                     .build(),
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("p99_cpu_utilization")
                                     .build())
                             .targetMultiMeasureName("multi-metrics")
                             .build())
                         .dimensionMappings(                    
                             ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                                 .dimensionValueType("VARCHAR")
                                 .name("az")
                                 .build(),
                             ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                                 .dimensionValueType("VARCHAR")
                                 .name("region")
                                 .build(),
                             ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                                 .dimensionValueType("VARCHAR")
                                 .name("hostname")
                                 .build())
                         .databaseName(results.databaseName())
                         .tableName(resultsAwsTimestreamwriteTable.tableName())
                         .timeColumn("binned_timestamp")
                         .build())
                     .build())
                 .executionRoleArn(exampleAwsIamRole.arn())
                 .name(exampleAwsTimestreamwriteTable.tableName())
                 .queryString("""
     SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
     \tROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
     \tROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
     \tROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
     \tROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
     FROM exampledatabase.exampletable
     WHERE measure_name = 'metrics' AND time > ago(2h)
     GROUP BY region, hostname, az, BIN(time, 15s)
     ORDER BY binned_timestamp ASC
     LIMIT 5
                 """)
                 .build());
     
         }
     }
     
     
    ### Multi-step Example To ingest data before creating a scheduled query, this example provides multiple steps: 1. Create the prerequisite infrastructure 2. Ingest data 3. Create the scheduled query ### Step 1. Create the prerequisite infrastructure
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.s3.Bucket;
     import com.pulumi.aws.s3.BucketArgs;
     import com.pulumi.aws.sns.Topic;
     import com.pulumi.aws.sns.TopicArgs;
     import com.pulumi.aws.sqs.Queue;
     import com.pulumi.aws.sqs.QueueArgs;
     import com.pulumi.aws.sns.TopicSubscription;
     import com.pulumi.aws.sns.TopicSubscriptionArgs;
     import com.pulumi.aws.sqs.QueuePolicy;
     import com.pulumi.aws.sqs.QueuePolicyArgs;
     import com.pulumi.aws.iam.Role;
     import com.pulumi.aws.iam.RoleArgs;
     import com.pulumi.aws.iam.RolePolicy;
     import com.pulumi.aws.iam.RolePolicyArgs;
     import com.pulumi.aws.timestreamwrite.Database;
     import com.pulumi.aws.timestreamwrite.DatabaseArgs;
     import com.pulumi.aws.timestreamwrite.Table;
     import com.pulumi.aws.timestreamwrite.TableArgs;
     import com.pulumi.aws.timestreamwrite.inputs.TableMagneticStoreWritePropertiesArgs;
     import com.pulumi.aws.timestreamwrite.inputs.TableRetentionPropertiesArgs;
     import static com.pulumi.codegen.internal.Serialization.*;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var test = new Bucket("test", BucketArgs.builder()
                 .bucket("example")
                 .forceDestroy(true)
                 .build());
     
             var testTopic = new Topic("testTopic", TopicArgs.builder()
                 .name("example")
                 .build());
     
             var testQueue = new Queue("testQueue", QueueArgs.builder()
                 .name("example")
                 .sqsManagedSseEnabled(true)
                 .build());
     
             var testTopicSubscription = new TopicSubscription("testTopicSubscription", TopicSubscriptionArgs.builder()
                 .topic(testTopic.arn())
                 .protocol("sqs")
                 .endpoint(testQueue.arn())
                 .build());
     
             var testQueuePolicy = new QueuePolicy("testQueuePolicy", QueuePolicyArgs.builder()
                 .queueUrl(testQueue.id())
                 .policy(Output.tuple(testQueue.arn(), testTopic.arn()).applyValue(values -> {
                     var testQueueArn = values.t1;
                     var testTopicArn = values.t2;
                     return serializeJson(
                         jsonObject(
                             jsonProperty("Version", "2012-10-17"),
                             jsonProperty("Statement", jsonArray(jsonObject(
                                 jsonProperty("Effect", "Allow"),
                                 jsonProperty("Principal", jsonObject(
                                     jsonProperty("AWS", "*")
                                 )),
                                 jsonProperty("Action", jsonArray("sqs:SendMessage")),
                                 jsonProperty("Resource", testQueueArn),
                                 jsonProperty("Condition", jsonObject(
                                     jsonProperty("ArnEquals", jsonObject(
                                         jsonProperty("aws:SourceArn", testTopicArn)
                                     ))
                                 ))
                             )))
                         ));
                 }))
                 .build());
     
             var testRole = new Role("testRole", RoleArgs.builder()
                 .name("example")
                 .assumeRolePolicy(serializeJson(
                     jsonObject(
                         jsonProperty("Version", "2012-10-17"),
                         jsonProperty("Statement", jsonArray(jsonObject(
                             jsonProperty("Effect", "Allow"),
                             jsonProperty("Principal", jsonObject(
                                 jsonProperty("Service", "timestream.amazonaws.com")
                             )),
                             jsonProperty("Action", "sts:AssumeRole")
                         )))
                     )))
                 .tags(Map.of("Name", "example"))
                 .build());
     
             var testRolePolicy = new RolePolicy("testRolePolicy", RolePolicyArgs.builder()
                 .name("example")
                 .role(testRole.id())
                 .policy(serializeJson(
                     jsonObject(
                         jsonProperty("Version", "2012-10-17"),
                         jsonProperty("Statement", jsonArray(jsonObject(
                             jsonProperty("Action", jsonArray(
                                 "kms:Decrypt", 
                                 "sns:Publish", 
                                 "timestream:describeEndpoints", 
                                 "timestream:Select", 
                                 "timestream:SelectValues", 
                                 "timestream:WriteRecords", 
                                 "s3:PutObject"
                             )),
                             jsonProperty("Resource", "*"),
                             jsonProperty("Effect", "Allow")
                         )))
                     )))
                 .build());
     
             var testDatabase = new Database("testDatabase", DatabaseArgs.builder()
                 .databaseName("exampledatabase")
                 .build());
     
             var testTable = new Table("testTable", TableArgs.builder()
                 .magneticStoreWriteProperties(TableMagneticStoreWritePropertiesArgs.builder()
                     .enableMagneticStoreWrites(true)
                     .build())
                 .retentionProperties(TableRetentionPropertiesArgs.builder()
                     .magneticStoreRetentionPeriodInDays(1)
                     .memoryStoreRetentionPeriodInHours(1)
                     .build())
                 .databaseName(testDatabase.databaseName())
                 .tableName("exampletable")
                 .build());
     
             var results = new Database("results", DatabaseArgs.builder()
                 .databaseName("exampledatabase-results")
                 .build());
     
             var resultsTable = new Table("resultsTable", TableArgs.builder()
                 .magneticStoreWriteProperties(TableMagneticStoreWritePropertiesArgs.builder()
                     .enableMagneticStoreWrites(true)
                     .build())
                 .retentionProperties(TableRetentionPropertiesArgs.builder()
                     .magneticStoreRetentionPeriodInDays(1)
                     .memoryStoreRetentionPeriodInHours(1)
                     .build())
                 .databaseName(results.databaseName())
                 .tableName("exampletable-results")
                 .build());
     
         }
     }
     
     
    #### Step 2. Ingest data This is done with Amazon Timestream Write [WriteRecords](https://docs.aws.amazon.com/timestream/latest/developerguide/API_WriteRecords.html). ### Step 3. Create the scheduled query
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.timestreamquery.ScheduledQuery;
     import com.pulumi.aws.timestreamquery.ScheduledQueryArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationSnsConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryScheduleConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs;
     import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var example = new ScheduledQuery("example", ScheduledQueryArgs.builder()
                 .errorReportConfiguration(ScheduledQueryErrorReportConfigurationArgs.builder()
                     .s3Configuration(ScheduledQueryErrorReportConfigurationS3ConfigurationArgs.builder()
                         .bucketName(exampleAwsS3Bucket.bucket())
                         .build())
                     .build())
                 .notificationConfiguration(ScheduledQueryNotificationConfigurationArgs.builder()
                     .snsConfiguration(ScheduledQueryNotificationConfigurationSnsConfigurationArgs.builder()
                         .topicArn(exampleAwsSnsTopic.arn())
                         .build())
                     .build())
                 .scheduleConfiguration(ScheduledQueryScheduleConfigurationArgs.builder()
                     .scheduleExpression("rate(1 hour)")
                     .build())
                 .targetConfiguration(ScheduledQueryTargetConfigurationArgs.builder()
                     .timestreamConfiguration(ScheduledQueryTargetConfigurationTimestreamConfigurationArgs.builder()
                         .multiMeasureMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs.builder()
                             .multiMeasureAttributeMappings(                        
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("avg_cpu_utilization")
                                     .build(),
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("p90_cpu_utilization")
                                     .build(),
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("p95_cpu_utilization")
                                     .build(),
                                 ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                     .measureValueType("DOUBLE")
                                     .sourceColumn("p99_cpu_utilization")
                                     .build())
                             .targetMultiMeasureName("multi-metrics")
                             .build())
                         .dimensionMappings(                    
                             ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                                 .dimensionValueType("VARCHAR")
                                 .name("az")
                                 .build(),
                             ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                                 .dimensionValueType("VARCHAR")
                                 .name("region")
                                 .build(),
                             ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                                 .dimensionValueType("VARCHAR")
                                 .name("hostname")
                                 .build())
                         .databaseName(results.databaseName())
                         .tableName(resultsAwsTimestreamwriteTable.tableName())
                         .timeColumn("binned_timestamp")
                         .build())
                     .build())
                 .executionRoleArn(exampleAwsIamRole.arn())
                 .name(exampleAwsTimestreamwriteTable.tableName())
                 .queryString("""
     SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
     \tROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
     \tROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
     \tROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
     \tROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
     FROM exampledatabase.exampletable
     WHERE measure_name = 'metrics' AND time > ago(2h)
     GROUP BY region, hostname, az, BIN(time, 15s)
     ORDER BY binned_timestamp ASC
     LIMIT 5
                 """)
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import Timestream Query Scheduled Query using the `arn`. For example: ```sh $ pulumi import aws:timestreamquery/scheduledQuery:ScheduledQuery example arn:aws:timestream:us-west-2:012345678901:scheduled-query/tf-acc-test-7774188528604787105-e13659544fe66c8d ```
    • Constructor Detail

      • ScheduledQuery

        public ScheduledQuery​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • ScheduledQuery

        public ScheduledQuery​(java.lang.String name,
                              ScheduledQueryArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • ScheduledQuery

        public ScheduledQuery​(java.lang.String name,
                              ScheduledQueryArgs args,
                              @Nullable
                              com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the Scheduled Query.
      • creationTime

        public com.pulumi.core.Output<java.lang.String> creationTime()
        Returns:
        Creation time for the scheduled query.
      • errorReportConfiguration

        public com.pulumi.core.Output<ScheduledQueryErrorReportConfiguration> errorReportConfiguration()
        Returns:
        Configuration block for error reporting configuration. See below.
      • executionRoleArn

        public com.pulumi.core.Output<java.lang.String> executionRoleArn()
        Returns:
        ARN for the IAM role that Timestream will assume when running the scheduled query.
      • kmsKeyId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()
        Returns:
        Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If `errorReportConfiguration` uses `SSE_KMS` as the encryption type, the same `kmsKeyId` is used to encrypt the error report at rest.
      • lastRunSummaries

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ScheduledQueryLastRunSummary>>> lastRunSummaries()
        Returns:
        Runtime summary for the last scheduled query run. See `lastRunSummary` Block for details.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Name of the scheduled query.
      • nextInvocationTime

        public com.pulumi.core.Output<java.lang.String> nextInvocationTime()
        Returns:
        Next time the scheduled query is scheduled to run.
      • notificationConfiguration

        public com.pulumi.core.Output<ScheduledQueryNotificationConfiguration> notificationConfiguration()
        Returns:
        Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
      • previousInvocationTime

        public com.pulumi.core.Output<java.lang.String> previousInvocationTime()
        Returns:
        Last time the scheduled query was run.
      • queryString

        public com.pulumi.core.Output<java.lang.String> queryString()
        Returns:
        Query string to run. Parameter names can be specified in the query string using the `@` character followed by an identifier. The named parameter `@scheduled_runtime` is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the `scheduleConfiguration` parameter, will be the value of `@scheduled_runtime` parameter for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the `@scheduled_runtime` parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
      • recentlyFailedRuns

        public com.pulumi.core.Output<java.util.Optional<java.util.List<ScheduledQueryRecentlyFailedRun>>> recentlyFailedRuns()
        Returns:
        Runtime summary for the last five failed scheduled query runs. See `recentlyFailedRuns` Block for details.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • scheduleConfiguration

        public com.pulumi.core.Output<ScheduledQueryScheduleConfiguration> scheduleConfiguration()
        Returns:
        Configuration block for schedule configuration for the query. See below.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        State of the scheduled query, either `ENABLED` or `DISABLED`.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • targetConfiguration

        public com.pulumi.core.Output<ScheduledQueryTargetConfiguration> targetConfiguration()
        Returns:
        Configuration block for writing the result of a query. See below. The following arguments are optional:
      • get

        public static ScheduledQuery get​(java.lang.String name,
                                         com.pulumi.core.Output<java.lang.String> id,
                                         @Nullable
                                         ScheduledQueryState state,
                                         @Nullable
                                         com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.