Skip to content

Commit

Permalink
Disambiguate conflicting NotificationConfiguration types in AwsConnec…
Browse files Browse the repository at this point in the history
…tor (#3658)

Fixes #3657

The new AwsConnector RP schema added several types called
NotificationConfiguration that are different.
  • Loading branch information
thomas11 authored Oct 22, 2024
1 parent 44ec792 commit 83d511e
Show file tree
Hide file tree
Showing 32 changed files with 1,022 additions and 722 deletions.
116 changes: 70 additions & 46 deletions provider/cmd/pulumi-resource-azure-native/schema.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions provider/pkg/gen/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ var typeNameOverrides = map[string]string{
"AwsConnector.RdsDbCluster.Endpoint": "RdsDbClusterEndpoint",
"AwsConnector.RdsDbInstance.Endpoint": "RdsDbInstanceEndpoint",
"AwsConnector.RedshiftCluster.Endpoint": "RedshiftClusterEndpoint",
// Upstream commit 1a49c263cc introduced TODO
"AwsConnector.DaxCluster.NotificationConfiguration": "DaxClusterNotificationConfiguration",
"AwsConnector.AutoScalingAutoScalingGroup.NotificationConfiguration": "AutoScalingGroupNotificationConfiguration",

// SKU for Redis Enterprise is different from SKU for Redis. Keep them as separate types.
"Cache.RedisEnterprise.Sku": "EnterpriseSku",
// This one is not a disambiguation but a fix for a type name "String" that is not descriptive and leads to
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureNative.AwsConnector.Inputs
{

/// <summary>
/// Definition of NotificationConfiguration
/// </summary>
public sealed class AutoScalingGroupNotificationConfigurationArgs : global::Pulumi.ResourceArgs
{
[Input("notificationTypes")]
private InputList<string>? _notificationTypes;

/// <summary>
/// A list of event types that send a notification. Event types can include any of the following types. *Allowed values*: + ``autoscaling:EC2_INSTANCE_LAUNCH`` + ``autoscaling:EC2_INSTANCE_LAUNCH_ERROR`` + ``autoscaling:EC2_INSTANCE_TERMINATE`` + ``autoscaling:EC2_INSTANCE_TERMINATE_ERROR`` + ``autoscaling:TEST_NOTIFICATION``
/// </summary>
public InputList<string> NotificationTypes
{
get => _notificationTypes ?? (_notificationTypes = new InputList<string>());
set => _notificationTypes = value;
}

/// <summary>
/// The Amazon Resource Name (ARN) of the Amazon SNS topic.
/// </summary>
[Input("topicARN")]
public Input<string>? TopicARN { get; set; }

public AutoScalingGroupNotificationConfigurationArgs()
{
}
public static new AutoScalingGroupNotificationConfigurationArgs Empty => new AutoScalingGroupNotificationConfigurationArgs();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@ public InputList<Inputs.MetricsCollectionArgs> MetricsCollection
/// A structure that specifies an Amazon SNS notification configuration for the ``NotificationConfigurations`` property of the [AWS::AutoScaling::AutoScalingGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) resource. For an example template snippet, see [Auto scaling template snippets](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-autoscaling.html). For more information, see [Get Amazon SNS notifications when your Auto Scaling group scales](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html) in the *Amazon EC2 Auto Scaling User Guide*.
/// </summary>
[Input("notificationConfiguration")]
public Input<Inputs.NotificationConfigurationArgs>? NotificationConfiguration { get; set; }
public Input<Inputs.AutoScalingGroupNotificationConfigurationArgs>? NotificationConfiguration { get; set; }

[Input("notificationConfigurations")]
private InputList<Inputs.NotificationConfigurationArgs>? _notificationConfigurations;
private InputList<Inputs.AutoScalingGroupNotificationConfigurationArgs>? _notificationConfigurations;

/// <summary>
/// Configures an Auto Scaling group to send notifications when specified events take place.
/// </summary>
public InputList<Inputs.NotificationConfigurationArgs> NotificationConfigurations
public InputList<Inputs.AutoScalingGroupNotificationConfigurationArgs> NotificationConfigurations
{
get => _notificationConfigurations ?? (_notificationConfigurations = new InputList<Inputs.NotificationConfigurationArgs>());
get => _notificationConfigurations ?? (_notificationConfigurations = new InputList<Inputs.AutoScalingGroupNotificationConfigurationArgs>());
set => _notificationConfigurations = value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public InputList<Inputs.NodeArgs> Nodes
/// &lt;p&gt;Describes a notification topic and its status. Notification topics are used for publishing DAX events to subscribers using Amazon Simple Notification Service (SNS).&lt;/p&gt;
/// </summary>
[Input("notificationConfiguration")]
public Input<Inputs.NotificationConfigurationArgs>? NotificationConfiguration { get; set; }
public Input<Inputs.DaxClusterNotificationConfigurationArgs>? NotificationConfiguration { get; set; }

/// <summary>
/// &lt;p&gt;The parameter group being used by nodes in the cluster.&lt;/p&gt;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureNative.AwsConnector.Inputs
{

/// <summary>
/// Definition of NotificationConfiguration
/// </summary>
public sealed class DaxClusterNotificationConfigurationArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// &lt;p&gt;The Amazon Resource Name (ARN) that identifies the topic. &lt;/p&gt;
/// </summary>
[Input("topicArn")]
public Input<string>? TopicArn { get; set; }

/// <summary>
/// &lt;p&gt;The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.&lt;/p&gt;
/// </summary>
[Input("topicStatus")]
public Input<string>? TopicStatus { get; set; }

public DaxClusterNotificationConfigurationArgs()
{
}
public static new DaxClusterNotificationConfigurationArgs Empty => new DaxClusterNotificationConfigurationArgs();
}
}
30 changes: 0 additions & 30 deletions sdk/dotnet/AwsConnector/Inputs/NotificationConfigurationArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ public InputList<Inputs.LambdaConfigurationArgs> LambdaConfigurations
set => _lambdaConfigurations = value;
}

[Input("notificationTypes")]
private InputList<string>? _notificationTypes;

/// <summary>
/// A list of event types that send a notification. Event types can include any of the following types. *Allowed values*: + ``autoscaling:EC2_INSTANCE_LAUNCH`` + ``autoscaling:EC2_INSTANCE_LAUNCH_ERROR`` + ``autoscaling:EC2_INSTANCE_TERMINATE`` + ``autoscaling:EC2_INSTANCE_TERMINATE_ERROR`` + ``autoscaling:TEST_NOTIFICATION``
/// </summary>
public InputList<string> NotificationTypes
{
get => _notificationTypes ?? (_notificationTypes = new InputList<string>());
set => _notificationTypes = value;
}

[Input("queueConfigurations")]
private InputList<Inputs.QueueConfigurationArgs>? _queueConfigurations;

Expand All @@ -57,18 +45,6 @@ public InputList<Inputs.QueueConfigurationArgs> QueueConfigurations
set => _queueConfigurations = value;
}

/// <summary>
/// The Amazon Resource Name (ARN) of the Amazon SNS topic.
/// </summary>
[Input("topicARN")]
public Input<string>? TopicARN { get; set; }

/// <summary>
/// &lt;p&gt;The Amazon Resource Name (ARN) that identifies the topic. &lt;/p&gt;
/// </summary>
[Input("topicArn")]
public Input<string>? TopicArn { get; set; }

[Input("topicConfigurations")]
private InputList<Inputs.TopicConfigurationArgs>? _topicConfigurations;

Expand All @@ -81,12 +57,6 @@ public InputList<Inputs.TopicConfigurationArgs> TopicConfigurations
set => _topicConfigurations = value;
}

/// <summary>
/// &lt;p&gt;The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.&lt;/p&gt;
/// </summary>
[Input("topicStatus")]
public Input<string>? TopicStatus { get; set; }

public NotificationConfigurationArgs()
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureNative.AwsConnector.Outputs
{

/// <summary>
/// Definition of NotificationConfiguration
/// </summary>
[OutputType]
public sealed class AutoScalingGroupNotificationConfigurationResponse
{
/// <summary>
/// A list of event types that send a notification. Event types can include any of the following types. *Allowed values*: + ``autoscaling:EC2_INSTANCE_LAUNCH`` + ``autoscaling:EC2_INSTANCE_LAUNCH_ERROR`` + ``autoscaling:EC2_INSTANCE_TERMINATE`` + ``autoscaling:EC2_INSTANCE_TERMINATE_ERROR`` + ``autoscaling:TEST_NOTIFICATION``
/// </summary>
public readonly ImmutableArray<string> NotificationTypes;
/// <summary>
/// The Amazon Resource Name (ARN) of the Amazon SNS topic.
/// </summary>
public readonly string? TopicARN;

[OutputConstructor]
private AutoScalingGroupNotificationConfigurationResponse(
ImmutableArray<string> notificationTypes,

string? topicARN)
{
NotificationTypes = notificationTypes;
TopicARN = topicARN;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ public sealed class AwsAutoScalingAutoScalingGroupPropertiesResponse
/// <summary>
/// A structure that specifies an Amazon SNS notification configuration for the ``NotificationConfigurations`` property of the [AWS::AutoScaling::AutoScalingGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) resource. For an example template snippet, see [Auto scaling template snippets](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-autoscaling.html). For more information, see [Get Amazon SNS notifications when your Auto Scaling group scales](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html) in the *Amazon EC2 Auto Scaling User Guide*.
/// </summary>
public readonly Outputs.NotificationConfigurationResponse? NotificationConfiguration;
public readonly Outputs.AutoScalingGroupNotificationConfigurationResponse? NotificationConfiguration;
/// <summary>
/// Configures an Auto Scaling group to send notifications when specified events take place.
/// </summary>
public readonly ImmutableArray<Outputs.NotificationConfigurationResponse> NotificationConfigurations;
public readonly ImmutableArray<Outputs.AutoScalingGroupNotificationConfigurationResponse> NotificationConfigurations;
/// <summary>
/// The name of the placement group into which to launch your instances. For more information, see [Placement groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) in the *Amazon EC2 User Guide for Linux Instances*. A *cluster* placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.
/// </summary>
Expand Down Expand Up @@ -183,9 +183,9 @@ private AwsAutoScalingAutoScalingGroupPropertiesResponse(

bool? newInstancesProtectedFromScaleIn,

Outputs.NotificationConfigurationResponse? notificationConfiguration,
Outputs.AutoScalingGroupNotificationConfigurationResponse? notificationConfiguration,

ImmutableArray<Outputs.NotificationConfigurationResponse> notificationConfigurations,
ImmutableArray<Outputs.AutoScalingGroupNotificationConfigurationResponse> notificationConfigurations,

string? placementGroup,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public sealed class AwsDaxClusterPropertiesResponse
/// <summary>
/// &lt;p&gt;Describes a notification topic and its status. Notification topics are used for publishing DAX events to subscribers using Amazon Simple Notification Service (SNS).&lt;/p&gt;
/// </summary>
public readonly Outputs.NotificationConfigurationResponse? NotificationConfiguration;
public readonly Outputs.DaxClusterNotificationConfigurationResponse? NotificationConfiguration;
/// <summary>
/// &lt;p&gt;The parameter group being used by nodes in the cluster.&lt;/p&gt;
/// </summary>
Expand Down Expand Up @@ -111,7 +111,7 @@ private AwsDaxClusterPropertiesResponse(

ImmutableArray<Outputs.NodeResponse> nodes,

Outputs.NotificationConfigurationResponse? notificationConfiguration,
Outputs.DaxClusterNotificationConfigurationResponse? notificationConfiguration,

Outputs.ParameterGroupStatusResponse? parameterGroup,

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureNative.AwsConnector.Outputs
{

/// <summary>
/// Definition of NotificationConfiguration
/// </summary>
[OutputType]
public sealed class DaxClusterNotificationConfigurationResponse
{
/// <summary>
/// &lt;p&gt;The Amazon Resource Name (ARN) that identifies the topic. &lt;/p&gt;
/// </summary>
public readonly string? TopicArn;
/// <summary>
/// &lt;p&gt;The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.&lt;/p&gt;
/// </summary>
public readonly string? TopicStatus;

[OutputConstructor]
private DaxClusterNotificationConfigurationResponse(
string? topicArn,

string? topicStatus)
{
TopicArn = topicArn;
TopicStatus = topicStatus;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,56 +25,28 @@ public sealed class NotificationConfigurationResponse
/// </summary>
public readonly ImmutableArray<Outputs.LambdaConfigurationResponse> LambdaConfigurations;
/// <summary>
/// A list of event types that send a notification. Event types can include any of the following types. *Allowed values*: + ``autoscaling:EC2_INSTANCE_LAUNCH`` + ``autoscaling:EC2_INSTANCE_LAUNCH_ERROR`` + ``autoscaling:EC2_INSTANCE_TERMINATE`` + ``autoscaling:EC2_INSTANCE_TERMINATE_ERROR`` + ``autoscaling:TEST_NOTIFICATION``
/// </summary>
public readonly ImmutableArray<string> NotificationTypes;
/// <summary>
/// The Amazon Simple Queue Service queues to publish messages to and the events for which to publish messages.
/// </summary>
public readonly ImmutableArray<Outputs.QueueConfigurationResponse> QueueConfigurations;
/// <summary>
/// The Amazon Resource Name (ARN) of the Amazon SNS topic.
/// </summary>
public readonly string? TopicARN;
/// <summary>
/// &lt;p&gt;The Amazon Resource Name (ARN) that identifies the topic. &lt;/p&gt;
/// </summary>
public readonly string? TopicArn;
/// <summary>
/// The topic to which notifications are sent and the events for which notifications are generated.
/// </summary>
public readonly ImmutableArray<Outputs.TopicConfigurationResponse> TopicConfigurations;
/// <summary>
/// &lt;p&gt;The current state of the topic. A value of “active” means that notifications will be sent to the topic. A value of “inactive” means that notifications will not be sent to the topic.&lt;/p&gt;
/// </summary>
public readonly string? TopicStatus;

[OutputConstructor]
private NotificationConfigurationResponse(
Outputs.EventBridgeConfigurationResponse? eventBridgeConfiguration,

ImmutableArray<Outputs.LambdaConfigurationResponse> lambdaConfigurations,

ImmutableArray<string> notificationTypes,

ImmutableArray<Outputs.QueueConfigurationResponse> queueConfigurations,

string? topicARN,

string? topicArn,

ImmutableArray<Outputs.TopicConfigurationResponse> topicConfigurations,

string? topicStatus)
ImmutableArray<Outputs.TopicConfigurationResponse> topicConfigurations)
{
EventBridgeConfiguration = eventBridgeConfiguration;
LambdaConfigurations = lambdaConfigurations;
NotificationTypes = notificationTypes;
QueueConfigurations = queueConfigurations;
TopicARN = topicARN;
TopicArn = topicArn;
TopicConfigurations = topicConfigurations;
TopicStatus = topicStatus;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AzureNative.AwsConnector.V20241201.Inputs
{

/// <summary>
/// Definition of NotificationConfiguration
/// </summary>
public sealed class AutoScalingGroupNotificationConfigurationArgs : global::Pulumi.ResourceArgs
{
[Input("notificationTypes")]
private InputList<string>? _notificationTypes;

/// <summary>
/// A list of event types that send a notification. Event types can include any of the following types. *Allowed values*: + ``autoscaling:EC2_INSTANCE_LAUNCH`` + ``autoscaling:EC2_INSTANCE_LAUNCH_ERROR`` + ``autoscaling:EC2_INSTANCE_TERMINATE`` + ``autoscaling:EC2_INSTANCE_TERMINATE_ERROR`` + ``autoscaling:TEST_NOTIFICATION``
/// </summary>
public InputList<string> NotificationTypes
{
get => _notificationTypes ?? (_notificationTypes = new InputList<string>());
set => _notificationTypes = value;
}

/// <summary>
/// The Amazon Resource Name (ARN) of the Amazon SNS topic.
/// </summary>
[Input("topicARN")]
public Input<string>? TopicARN { get; set; }

public AutoScalingGroupNotificationConfigurationArgs()
{
}
public static new AutoScalingGroupNotificationConfigurationArgs Empty => new AutoScalingGroupNotificationConfigurationArgs();
}
}
Loading

0 comments on commit 83d511e

Please sign in to comment.