From f27b4cc1fdd219e293887957d08b2c40223de028 Mon Sep 17 00:00:00 2001 From: Ramon Quitales Date: Wed, 28 Jun 2023 14:55:59 -0700 Subject: [PATCH] Delete SDK files to force CI to recommit --- .github/workflows/run-acceptance-tests.yml | 12 + provider/resources.go | 2 +- sdk/dotnet/Xray/README.md | 1 - sdk/go/aws/simpledb/domain.go | 247 ----------- .../com/pulumi/aws/xray/SamplingRule.java | 334 --------------- sdk/nodejs/transfer/getServer.ts | 121 ------ sdk/python/pulumi_aws/xray/group.py | 392 ------------------ 7 files changed, 13 insertions(+), 1096 deletions(-) delete mode 100644 sdk/dotnet/Xray/README.md delete mode 100644 sdk/go/aws/simpledb/domain.go delete mode 100644 sdk/java/src/main/java/com/pulumi/aws/xray/SamplingRule.java delete mode 100644 sdk/nodejs/transfer/getServer.ts delete mode 100644 sdk/python/pulumi_aws/xray/group.py diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index a3b85d312b7..35e04763177 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -99,11 +99,23 @@ jobs: - name: Build SDK run: make build_${{ matrix.language }} # Commit all changed files back to the repository + - name: Sync any changes from the remote + run: git pull origin ${{ github.head_ref }} - name: Commit generated SDK uses: rquitales/git-recommit-action@v1 + id: recommit with: commit_message: "[automated] Add generated SDKs" file_pattern: sdk/ + # push_options: --dry-run + - name: Comment PR if changes were made + if: steps.recommit.outputs.changes_detected == 'true' + uses: thollander/actions-comment-pull-request@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + message: > + A new commit was added to this PR as part of the SDK build process. + SDKs were recommitted for the following language: ${{ matrix.language }}. - name: Check worktree clean run: ./ci-scripts/ci/check-worktree-is-clean - name: Compress SDK folder diff --git a/provider/resources.go b/provider/resources.go index 5cf8f93a4a3..51094481140 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -7002,7 +7002,7 @@ func Provider() tfbridge.ProviderInfo { prov.SetAutonaming(255, "-") // Add a CSharp-specific override for aws_s3_bucket.bucket. - prov.Resources["aws_s3_bucket_legacy"].Fields["bucket"].CSharpName = "BucketName" + prov.Resources["aws_s3_bucket_legacy"].Fields["bucket"].CSharpName = "BucketNameNew" return prov } diff --git a/sdk/dotnet/Xray/README.md b/sdk/dotnet/Xray/README.md deleted file mode 100644 index 9d868f18f20..00000000000 --- a/sdk/dotnet/Xray/README.md +++ /dev/null @@ -1 +0,0 @@ -A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources. diff --git a/sdk/go/aws/simpledb/domain.go b/sdk/go/aws/simpledb/domain.go deleted file mode 100644 index 3233b9e38fe..00000000000 --- a/sdk/go/aws/simpledb/domain.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package simpledb - -import ( - "context" - "reflect" - - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -// Provides a SimpleDB domain resource -// -// ## Example Usage -// -// ```go -// package main -// -// import ( -// -// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/simpledb" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := simpledb.NewDomain(ctx, "users", nil) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// -// ``` -// -// ## Import -// -// SimpleDB Domains can be imported using the `name`, e.g., -// -// ```sh -// -// $ pulumi import aws:simpledb/domain:Domain users users -// -// ``` -type Domain struct { - pulumi.CustomResourceState - - // The name of the SimpleDB domain - Name pulumi.StringOutput `pulumi:"name"` -} - -// NewDomain registers a new resource with the given unique name, arguments, and options. -func NewDomain(ctx *pulumi.Context, - name string, args *DomainArgs, opts ...pulumi.ResourceOption) (*Domain, error) { - if args == nil { - args = &DomainArgs{} - } - - var resource Domain - err := ctx.RegisterResource("aws:simpledb/domain:Domain", name, args, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// GetDomain gets an existing Domain resource's state with the given name, ID, and optional -// state properties that are used to uniquely qualify the lookup (nil if not required). -func GetDomain(ctx *pulumi.Context, - name string, id pulumi.IDInput, state *DomainState, opts ...pulumi.ResourceOption) (*Domain, error) { - var resource Domain - err := ctx.ReadResource("aws:simpledb/domain:Domain", name, id, state, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// Input properties used for looking up and filtering Domain resources. -type domainState struct { - // The name of the SimpleDB domain - Name *string `pulumi:"name"` -} - -type DomainState struct { - // The name of the SimpleDB domain - Name pulumi.StringPtrInput -} - -func (DomainState) ElementType() reflect.Type { - return reflect.TypeOf((*domainState)(nil)).Elem() -} - -type domainArgs struct { - // The name of the SimpleDB domain - Name *string `pulumi:"name"` -} - -// The set of arguments for constructing a Domain resource. -type DomainArgs struct { - // The name of the SimpleDB domain - Name pulumi.StringPtrInput -} - -func (DomainArgs) ElementType() reflect.Type { - return reflect.TypeOf((*domainArgs)(nil)).Elem() -} - -type DomainInput interface { - pulumi.Input - - ToDomainOutput() DomainOutput - ToDomainOutputWithContext(ctx context.Context) DomainOutput -} - -func (*Domain) ElementType() reflect.Type { - return reflect.TypeOf((**Domain)(nil)).Elem() -} - -func (i *Domain) ToDomainOutput() DomainOutput { - return i.ToDomainOutputWithContext(context.Background()) -} - -func (i *Domain) ToDomainOutputWithContext(ctx context.Context) DomainOutput { - return pulumi.ToOutputWithContext(ctx, i).(DomainOutput) -} - -// DomainArrayInput is an input type that accepts DomainArray and DomainArrayOutput values. -// You can construct a concrete instance of `DomainArrayInput` via: -// -// DomainArray{ DomainArgs{...} } -type DomainArrayInput interface { - pulumi.Input - - ToDomainArrayOutput() DomainArrayOutput - ToDomainArrayOutputWithContext(context.Context) DomainArrayOutput -} - -type DomainArray []DomainInput - -func (DomainArray) ElementType() reflect.Type { - return reflect.TypeOf((*[]*Domain)(nil)).Elem() -} - -func (i DomainArray) ToDomainArrayOutput() DomainArrayOutput { - return i.ToDomainArrayOutputWithContext(context.Background()) -} - -func (i DomainArray) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput { - return pulumi.ToOutputWithContext(ctx, i).(DomainArrayOutput) -} - -// DomainMapInput is an input type that accepts DomainMap and DomainMapOutput values. -// You can construct a concrete instance of `DomainMapInput` via: -// -// DomainMap{ "key": DomainArgs{...} } -type DomainMapInput interface { - pulumi.Input - - ToDomainMapOutput() DomainMapOutput - ToDomainMapOutputWithContext(context.Context) DomainMapOutput -} - -type DomainMap map[string]DomainInput - -func (DomainMap) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*Domain)(nil)).Elem() -} - -func (i DomainMap) ToDomainMapOutput() DomainMapOutput { - return i.ToDomainMapOutputWithContext(context.Background()) -} - -func (i DomainMap) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput { - return pulumi.ToOutputWithContext(ctx, i).(DomainMapOutput) -} - -type DomainOutput struct{ *pulumi.OutputState } - -func (DomainOutput) ElementType() reflect.Type { - return reflect.TypeOf((**Domain)(nil)).Elem() -} - -func (o DomainOutput) ToDomainOutput() DomainOutput { - return o -} - -func (o DomainOutput) ToDomainOutputWithContext(ctx context.Context) DomainOutput { - return o -} - -// The name of the SimpleDB domain -func (o DomainOutput) Name() pulumi.StringOutput { - return o.ApplyT(func(v *Domain) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) -} - -type DomainArrayOutput struct{ *pulumi.OutputState } - -func (DomainArrayOutput) ElementType() reflect.Type { - return reflect.TypeOf((*[]*Domain)(nil)).Elem() -} - -func (o DomainArrayOutput) ToDomainArrayOutput() DomainArrayOutput { - return o -} - -func (o DomainArrayOutput) ToDomainArrayOutputWithContext(ctx context.Context) DomainArrayOutput { - return o -} - -func (o DomainArrayOutput) Index(i pulumi.IntInput) DomainOutput { - return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Domain { - return vs[0].([]*Domain)[vs[1].(int)] - }).(DomainOutput) -} - -type DomainMapOutput struct{ *pulumi.OutputState } - -func (DomainMapOutput) ElementType() reflect.Type { - return reflect.TypeOf((*map[string]*Domain)(nil)).Elem() -} - -func (o DomainMapOutput) ToDomainMapOutput() DomainMapOutput { - return o -} - -func (o DomainMapOutput) ToDomainMapOutputWithContext(ctx context.Context) DomainMapOutput { - return o -} - -func (o DomainMapOutput) MapIndex(k pulumi.StringInput) DomainOutput { - return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Domain { - return vs[0].(map[string]*Domain)[vs[1].(string)] - }).(DomainOutput) -} - -func init() { - pulumi.RegisterInputType(reflect.TypeOf((*DomainInput)(nil)).Elem(), &Domain{}) - pulumi.RegisterInputType(reflect.TypeOf((*DomainArrayInput)(nil)).Elem(), DomainArray{}) - pulumi.RegisterInputType(reflect.TypeOf((*DomainMapInput)(nil)).Elem(), DomainMap{}) - pulumi.RegisterOutputType(DomainOutput{}) - pulumi.RegisterOutputType(DomainArrayOutput{}) - pulumi.RegisterOutputType(DomainMapOutput{}) -} diff --git a/sdk/java/src/main/java/com/pulumi/aws/xray/SamplingRule.java b/sdk/java/src/main/java/com/pulumi/aws/xray/SamplingRule.java deleted file mode 100644 index 3c716169630..00000000000 --- a/sdk/java/src/main/java/com/pulumi/aws/xray/SamplingRule.java +++ /dev/null @@ -1,334 +0,0 @@ -// *** WARNING: this file was generated by pulumi-java-gen. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -package com.pulumi.aws.xray; - -import com.pulumi.aws.Utilities; -import com.pulumi.aws.xray.SamplingRuleArgs; -import com.pulumi.aws.xray.inputs.SamplingRuleState; -import com.pulumi.core.Output; -import com.pulumi.core.annotations.Export; -import com.pulumi.core.annotations.ResourceType; -import com.pulumi.core.internal.Codegen; -import java.lang.Double; -import java.lang.Integer; -import java.lang.String; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Nullable; - -/** - * Creates and manages an AWS XRay Sampling Rule. - * - * ## Example Usage - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.aws.xray.SamplingRule; - * import com.pulumi.aws.xray.SamplingRuleArgs; - * import java.util.List; - * import java.util.ArrayList; - * 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 SamplingRule("example", SamplingRuleArgs.builder() - * .attributes(Map.of("Hello", "Tris")) - * .fixedRate(0.05) - * .host("*") - * .httpMethod("*") - * .priority(10000) - * .reservoirSize(1) - * .resourceArn("*") - * .ruleName("example") - * .serviceName("*") - * .serviceType("*") - * .urlPath("*") - * .version(1) - * .build()); - * - * } - * } - * ``` - * - * ## Import - * - * XRay Sampling Rules can be imported using the name, e.g., - * - * ```sh - * $ pulumi import aws:xray/samplingRule:SamplingRule example example - * ``` - * - */ -@ResourceType(type="aws:xray/samplingRule:SamplingRule") -public class SamplingRule extends com.pulumi.resources.CustomResource { - /** - * The ARN of the sampling rule. - * - */ - @Export(name="arn", refs={String.class}, tree="[0]") - private Output arn; - - /** - * @return The ARN of the sampling rule. - * - */ - public Output arn() { - return this.arn; - } - /** - * Matches attributes derived from the request. - * - */ - @Export(name="attributes", refs={Map.class,String.class}, tree="[0,1,1]") - private Output> attributes; - - /** - * @return Matches attributes derived from the request. - * - */ - public Output>> attributes() { - return Codegen.optional(this.attributes); - } - /** - * The percentage of matching requests to instrument, after the reservoir is exhausted. - * - */ - @Export(name="fixedRate", refs={Double.class}, tree="[0]") - private Output fixedRate; - - /** - * @return The percentage of matching requests to instrument, after the reservoir is exhausted. - * - */ - public Output fixedRate() { - return this.fixedRate; - } - /** - * Matches the hostname from a request URL. - * - */ - @Export(name="host", refs={String.class}, tree="[0]") - private Output host; - - /** - * @return Matches the hostname from a request URL. - * - */ - public Output host() { - return this.host; - } - /** - * Matches the HTTP method of a request. - * - */ - @Export(name="httpMethod", refs={String.class}, tree="[0]") - private Output httpMethod; - - /** - * @return Matches the HTTP method of a request. - * - */ - public Output httpMethod() { - return this.httpMethod; - } - /** - * The priority of the sampling rule. - * - */ - @Export(name="priority", refs={Integer.class}, tree="[0]") - private Output priority; - - /** - * @return The priority of the sampling rule. - * - */ - public Output priority() { - return this.priority; - } - /** - * A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively. - * - */ - @Export(name="reservoirSize", refs={Integer.class}, tree="[0]") - private Output reservoirSize; - - /** - * @return A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively. - * - */ - public Output reservoirSize() { - return this.reservoirSize; - } - /** - * Matches the ARN of the AWS resource on which the service runs. - * - */ - @Export(name="resourceArn", refs={String.class}, tree="[0]") - private Output resourceArn; - - /** - * @return Matches the ARN of the AWS resource on which the service runs. - * - */ - public Output resourceArn() { - return this.resourceArn; - } - /** - * The name of the sampling rule. - * - */ - @Export(name="ruleName", refs={String.class}, tree="[0]") - private Output ruleName; - - /** - * @return The name of the sampling rule. - * - */ - public Output> ruleName() { - return Codegen.optional(this.ruleName); - } - /** - * Matches the `name` that the service uses to identify itself in segments. - * - */ - @Export(name="serviceName", refs={String.class}, tree="[0]") - private Output serviceName; - - /** - * @return Matches the `name` that the service uses to identify itself in segments. - * - */ - public Output serviceName() { - return this.serviceName; - } - /** - * Matches the `origin` that the service uses to identify its type in segments. - * - */ - @Export(name="serviceType", refs={String.class}, tree="[0]") - private Output serviceType; - - /** - * @return Matches the `origin` that the service uses to identify its type in segments. - * - */ - public Output serviceType() { - return this.serviceType; - } - /** - * Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - * - */ - @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") - private Output> tags; - - /** - * @return Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - * - */ - public Output>> tags() { - return Codegen.optional(this.tags); - } - /** - * A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. - * - */ - @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") - private Output> tagsAll; - - /** - * @return A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. - * - */ - public Output> tagsAll() { - return this.tagsAll; - } - /** - * Matches the path from a request URL. - * - */ - @Export(name="urlPath", refs={String.class}, tree="[0]") - private Output urlPath; - - /** - * @return Matches the path from a request URL. - * - */ - public Output urlPath() { - return this.urlPath; - } - /** - * The version of the sampling rule format (`1` ) - * - */ - @Export(name="version", refs={Integer.class}, tree="[0]") - private Output version; - - /** - * @return The version of the sampling rule format (`1` ) - * - */ - public Output version() { - return this.version; - } - - /** - * - * @param name The _unique_ name of the resulting resource. - */ - public SamplingRule(String name) { - this(name, SamplingRuleArgs.Empty); - } - /** - * - * @param name The _unique_ name of the resulting resource. - * @param args The arguments to use to populate this resource's properties. - */ - public SamplingRule(String name, SamplingRuleArgs args) { - this(name, args, null); - } - /** - * - * @param name The _unique_ name of the resulting resource. - * @param args The arguments to use to populate this resource's properties. - * @param options A bag of options that control this resource's behavior. - */ - public SamplingRule(String name, SamplingRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("aws:xray/samplingRule:SamplingRule", name, args == null ? SamplingRuleArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); - } - - private SamplingRule(String name, Output id, @Nullable SamplingRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("aws:xray/samplingRule:SamplingRule", name, state, makeResourceOptions(options, id)); - } - - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { - var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() - .version(Utilities.getVersion()) - .build(); - return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); - } - - /** - * Get an existing Host resource's state with the given name, ID, and optional extra - * properties used to qualify the lookup. - * - * @param name The _unique_ name of the resulting resource. - * @param id The _unique_ provider ID of the resource to lookup. - * @param state - * @param options Optional settings to control the behavior of the CustomResource. - */ - public static SamplingRule get(String name, Output id, @Nullable SamplingRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - return new SamplingRule(name, id, state, options); - } -} diff --git a/sdk/nodejs/transfer/getServer.ts b/sdk/nodejs/transfer/getServer.ts deleted file mode 100644 index 019532f14c2..00000000000 --- a/sdk/nodejs/transfer/getServer.ts +++ /dev/null @@ -1,121 +0,0 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -import * as pulumi from "@pulumi/pulumi"; -import * as utilities from "../utilities"; - -/** - * Use this data source to get the ARN of an AWS Transfer Server for use in other - * resources. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as aws from "@pulumi/aws"; - * - * const example = aws.transfer.getServer({ - * serverId: "s-1234567", - * }); - * ``` - */ -export function getServer(args: GetServerArgs, opts?: pulumi.InvokeOptions): Promise { - - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); - return pulumi.runtime.invoke("aws:transfer/getServer:getServer", { - "serverId": args.serverId, - }, opts); -} - -/** - * A collection of arguments for invoking getServer. - */ -export interface GetServerArgs { - /** - * ID for an SFTP server. - */ - serverId: string; -} - -/** - * A collection of values returned by getServer. - */ -export interface GetServerResult { - /** - * ARN of Transfer Server. - */ - readonly arn: string; - /** - * ARN of any certificate. - */ - readonly certificate: string; - /** - * The domain of the storage system that is used for file transfers. - */ - readonly domain: string; - /** - * Endpoint of the Transfer Server (e.g., `s-12345678.server.transfer.REGION.amazonaws.com`). - */ - readonly endpoint: string; - /** - * Type of endpoint that the server is connected to. - */ - readonly endpointType: string; - /** - * The provider-assigned unique ID for this managed resource. - */ - readonly id: string; - /** - * 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. - */ - readonly identityProviderType: string; - /** - * ARN of the IAM role used to authenticate the user account with an `identityProviderType` of `API_GATEWAY`. - */ - readonly invocationRole: string; - /** - * 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. - */ - readonly loggingRole: string; - /** - * File transfer protocol or protocols over which your file transfer protocol client can connect to your server's endpoint. - */ - readonly protocols: string[]; - /** - * The name of the security policy that is attached to the server. - */ - readonly securityPolicyName: string; - readonly serverId: string; - /** - * URL of the service endpoint used to authenticate users with an `identityProviderType` of `API_GATEWAY`. - */ - readonly url: string; -} -/** - * Use this data source to get the ARN of an AWS Transfer Server for use in other - * resources. - * - * ## Example Usage - * - * ```typescript - * import * as pulumi from "@pulumi/pulumi"; - * import * as aws from "@pulumi/aws"; - * - * const example = aws.transfer.getServer({ - * serverId: "s-1234567", - * }); - * ``` - */ -export function getServerOutput(args: GetServerOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { - return pulumi.output(args).apply((a: any) => getServer(a, opts)) -} - -/** - * A collection of arguments for invoking getServer. - */ -export interface GetServerOutputArgs { - /** - * ID for an SFTP server. - */ - serverId: pulumi.Input; -} diff --git a/sdk/python/pulumi_aws/xray/group.py b/sdk/python/pulumi_aws/xray/group.py deleted file mode 100644 index 7e1a237104c..00000000000 --- a/sdk/python/pulumi_aws/xray/group.py +++ /dev/null @@ -1,392 +0,0 @@ -# coding=utf-8 -# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** -# *** Do not edit by hand unless you're certain you know what you are doing! *** - -import copy -import warnings -import pulumi -import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload -from .. import _utilities -from . import outputs -from ._inputs import * - -__all__ = ['GroupArgs', 'Group'] - -@pulumi.input_type -class GroupArgs: - def __init__(__self__, *, - filter_expression: pulumi.Input[str], - group_name: pulumi.Input[str], - insights_configuration: Optional[pulumi.Input['GroupInsightsConfigurationArgs']] = None, - tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None): - """ - The set of arguments for constructing a Group resource. - :param pulumi.Input[str] filter_expression: The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html). - :param pulumi.Input[str] group_name: The name of the group. - :param pulumi.Input['GroupInsightsConfigurationArgs'] insights_configuration: Configuration options for enabling insights. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - """ - pulumi.set(__self__, "filter_expression", filter_expression) - pulumi.set(__self__, "group_name", group_name) - if insights_configuration is not None: - pulumi.set(__self__, "insights_configuration", insights_configuration) - if tags is not None: - pulumi.set(__self__, "tags", tags) - - @property - @pulumi.getter(name="filterExpression") - def filter_expression(self) -> pulumi.Input[str]: - """ - The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html). - """ - return pulumi.get(self, "filter_expression") - - @filter_expression.setter - def filter_expression(self, value: pulumi.Input[str]): - pulumi.set(self, "filter_expression", value) - - @property - @pulumi.getter(name="groupName") - def group_name(self) -> pulumi.Input[str]: - """ - The name of the group. - """ - return pulumi.get(self, "group_name") - - @group_name.setter - def group_name(self, value: pulumi.Input[str]): - pulumi.set(self, "group_name", value) - - @property - @pulumi.getter(name="insightsConfiguration") - def insights_configuration(self) -> Optional[pulumi.Input['GroupInsightsConfigurationArgs']]: - """ - Configuration options for enabling insights. - """ - return pulumi.get(self, "insights_configuration") - - @insights_configuration.setter - def insights_configuration(self, value: Optional[pulumi.Input['GroupInsightsConfigurationArgs']]): - pulumi.set(self, "insights_configuration", value) - - @property - @pulumi.getter - def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: - """ - Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - """ - return pulumi.get(self, "tags") - - @tags.setter - def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): - pulumi.set(self, "tags", value) - - -@pulumi.input_type -class _GroupState: - def __init__(__self__, *, - arn: Optional[pulumi.Input[str]] = None, - filter_expression: Optional[pulumi.Input[str]] = None, - group_name: Optional[pulumi.Input[str]] = None, - insights_configuration: Optional[pulumi.Input['GroupInsightsConfigurationArgs']] = None, - tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, - tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None): - """ - Input properties used for looking up and filtering Group resources. - :param pulumi.Input[str] arn: The ARN of the Group. - :param pulumi.Input[str] filter_expression: The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html). - :param pulumi.Input[str] group_name: The name of the group. - :param pulumi.Input['GroupInsightsConfigurationArgs'] insights_configuration: Configuration options for enabling insights. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. - """ - if arn is not None: - pulumi.set(__self__, "arn", arn) - if filter_expression is not None: - pulumi.set(__self__, "filter_expression", filter_expression) - if group_name is not None: - pulumi.set(__self__, "group_name", group_name) - if insights_configuration is not None: - pulumi.set(__self__, "insights_configuration", insights_configuration) - if tags is not None: - pulumi.set(__self__, "tags", tags) - if tags_all is not None: - pulumi.set(__self__, "tags_all", tags_all) - - @property - @pulumi.getter - def arn(self) -> Optional[pulumi.Input[str]]: - """ - The ARN of the Group. - """ - return pulumi.get(self, "arn") - - @arn.setter - def arn(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "arn", value) - - @property - @pulumi.getter(name="filterExpression") - def filter_expression(self) -> Optional[pulumi.Input[str]]: - """ - The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html). - """ - return pulumi.get(self, "filter_expression") - - @filter_expression.setter - def filter_expression(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "filter_expression", value) - - @property - @pulumi.getter(name="groupName") - def group_name(self) -> Optional[pulumi.Input[str]]: - """ - The name of the group. - """ - return pulumi.get(self, "group_name") - - @group_name.setter - def group_name(self, value: Optional[pulumi.Input[str]]): - pulumi.set(self, "group_name", value) - - @property - @pulumi.getter(name="insightsConfiguration") - def insights_configuration(self) -> Optional[pulumi.Input['GroupInsightsConfigurationArgs']]: - """ - Configuration options for enabling insights. - """ - return pulumi.get(self, "insights_configuration") - - @insights_configuration.setter - def insights_configuration(self, value: Optional[pulumi.Input['GroupInsightsConfigurationArgs']]): - pulumi.set(self, "insights_configuration", value) - - @property - @pulumi.getter - def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: - """ - Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - """ - return pulumi.get(self, "tags") - - @tags.setter - def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): - pulumi.set(self, "tags", value) - - @property - @pulumi.getter(name="tagsAll") - def tags_all(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: - """ - A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. - """ - return pulumi.get(self, "tags_all") - - @tags_all.setter - def tags_all(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): - pulumi.set(self, "tags_all", value) - - -class Group(pulumi.CustomResource): - @overload - def __init__(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - filter_expression: Optional[pulumi.Input[str]] = None, - group_name: Optional[pulumi.Input[str]] = None, - insights_configuration: Optional[pulumi.Input[pulumi.InputType['GroupInsightsConfigurationArgs']]] = None, - tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, - __props__=None): - """ - Creates and manages an AWS XRay Group. - - ## Example Usage - - ```python - import pulumi - import pulumi_aws as aws - - example = aws.xray.Group("example", - filter_expression="responsetime > 5", - group_name="example", - insights_configuration=aws.xray.GroupInsightsConfigurationArgs( - insights_enabled=True, - notifications_enabled=True, - )) - ``` - - ## Import - - XRay Groups can be imported using the ARN, e.g., - - ```sh - $ pulumi import aws:xray/group:Group example arn:aws:xray:us-west-2:1234567890:group/example-group/TNGX7SW5U6QY36T4ZMOUA3HVLBYCZTWDIOOXY3CJAXTHSS3YCWUA - ``` - - :param str resource_name: The name of the resource. - :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] filter_expression: The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html). - :param pulumi.Input[str] group_name: The name of the group. - :param pulumi.Input[pulumi.InputType['GroupInsightsConfigurationArgs']] insights_configuration: Configuration options for enabling insights. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - """ - ... - @overload - def __init__(__self__, - resource_name: str, - args: GroupArgs, - opts: Optional[pulumi.ResourceOptions] = None): - """ - Creates and manages an AWS XRay Group. - - ## Example Usage - - ```python - import pulumi - import pulumi_aws as aws - - example = aws.xray.Group("example", - filter_expression="responsetime > 5", - group_name="example", - insights_configuration=aws.xray.GroupInsightsConfigurationArgs( - insights_enabled=True, - notifications_enabled=True, - )) - ``` - - ## Import - - XRay Groups can be imported using the ARN, e.g., - - ```sh - $ pulumi import aws:xray/group:Group example arn:aws:xray:us-west-2:1234567890:group/example-group/TNGX7SW5U6QY36T4ZMOUA3HVLBYCZTWDIOOXY3CJAXTHSS3YCWUA - ``` - - :param str resource_name: The name of the resource. - :param GroupArgs args: The arguments to use to populate this resource's properties. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - ... - def __init__(__self__, resource_name: str, *args, **kwargs): - resource_args, opts = _utilities.get_resource_args_opts(GroupArgs, pulumi.ResourceOptions, *args, **kwargs) - if resource_args is not None: - __self__._internal_init(resource_name, opts, **resource_args.__dict__) - else: - __self__._internal_init(resource_name, *args, **kwargs) - - def _internal_init(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - filter_expression: Optional[pulumi.Input[str]] = None, - group_name: Optional[pulumi.Input[str]] = None, - insights_configuration: Optional[pulumi.Input[pulumi.InputType['GroupInsightsConfigurationArgs']]] = None, - tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, - __props__=None): - opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) - if not isinstance(opts, pulumi.ResourceOptions): - raise TypeError('Expected resource options to be a ResourceOptions instance') - if opts.id is None: - if __props__ is not None: - raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') - __props__ = GroupArgs.__new__(GroupArgs) - - if filter_expression is None and not opts.urn: - raise TypeError("Missing required property 'filter_expression'") - __props__.__dict__["filter_expression"] = filter_expression - if group_name is None and not opts.urn: - raise TypeError("Missing required property 'group_name'") - __props__.__dict__["group_name"] = group_name - __props__.__dict__["insights_configuration"] = insights_configuration - __props__.__dict__["tags"] = tags - __props__.__dict__["arn"] = None - __props__.__dict__["tags_all"] = None - super(Group, __self__).__init__( - 'aws:xray/group:Group', - resource_name, - __props__, - opts) - - @staticmethod - def get(resource_name: str, - id: pulumi.Input[str], - opts: Optional[pulumi.ResourceOptions] = None, - arn: Optional[pulumi.Input[str]] = None, - filter_expression: Optional[pulumi.Input[str]] = None, - group_name: Optional[pulumi.Input[str]] = None, - insights_configuration: Optional[pulumi.Input[pulumi.InputType['GroupInsightsConfigurationArgs']]] = None, - tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, - tags_all: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'Group': - """ - Get an existing Group resource's state with the given name, id, and optional extra - properties used to qualify the lookup. - - :param str resource_name: The unique name of the resulting resource. - :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. - :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[str] arn: The ARN of the Group. - :param pulumi.Input[str] filter_expression: The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html). - :param pulumi.Input[str] group_name: The name of the group. - :param pulumi.Input[pulumi.InputType['GroupInsightsConfigurationArgs']] insights_configuration: Configuration options for enabling insights. - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags_all: A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. - """ - opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) - - __props__ = _GroupState.__new__(_GroupState) - - __props__.__dict__["arn"] = arn - __props__.__dict__["filter_expression"] = filter_expression - __props__.__dict__["group_name"] = group_name - __props__.__dict__["insights_configuration"] = insights_configuration - __props__.__dict__["tags"] = tags - __props__.__dict__["tags_all"] = tags_all - return Group(resource_name, opts=opts, __props__=__props__) - - @property - @pulumi.getter - def arn(self) -> pulumi.Output[str]: - """ - The ARN of the Group. - """ - return pulumi.get(self, "arn") - - @property - @pulumi.getter(name="filterExpression") - def filter_expression(self) -> pulumi.Output[str]: - """ - The filter expression defining criteria by which to group traces. more info can be found in official [docs](https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html). - """ - return pulumi.get(self, "filter_expression") - - @property - @pulumi.getter(name="groupName") - def group_name(self) -> pulumi.Output[str]: - """ - The name of the group. - """ - return pulumi.get(self, "group_name") - - @property - @pulumi.getter(name="insightsConfiguration") - def insights_configuration(self) -> pulumi.Output['outputs.GroupInsightsConfiguration']: - """ - Configuration options for enabling insights. - """ - return pulumi.get(self, "insights_configuration") - - @property - @pulumi.getter - def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]: - """ - Key-value mapping of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level - """ - return pulumi.get(self, "tags") - - @property - @pulumi.getter(name="tagsAll") - def tags_all(self) -> pulumi.Output[Mapping[str, str]]: - """ - A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. - """ - return pulumi.get(self, "tags_all") -