// Code generated by generators/resource/main.go; DO NOT EDIT. package chatbot import ( "context" "regexp" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" . "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_chatbot_slack_channel_configuration", slackChannelConfigurationResourceType) } // slackChannelConfigurationResourceType returns the Terraform awscc_chatbot_slack_channel_configuration resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Chatbot::SlackChannelConfiguration resource type. func slackChannelConfigurationResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "description": "Amazon Resource Name (ARN) of the configuration", // "pattern": "", // "type": "string" // } Description: "Amazon Resource Name (ARN) of the configuration", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "configuration_name": { // Property: ConfigurationName // CloudFormation resource type schema: // { // "description": "The name of the configuration", // "maxLength": 128, // "minLength": 1, // "pattern": "^[A-Za-z0-9-_]+$", // "type": "string" // } Description: "The name of the configuration", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), validate.StringMatch(regexp.MustCompile("^[A-Za-z0-9-_]+$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "guardrail_policies": { // Property: GuardrailPolicies // CloudFormation resource type schema: // { // "description": "The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.", // "insertionOrder": false, // "items": { // "pattern": "", // "type": "string" // }, // "type": "array" // } Description: "The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.", Type: types.ListType{ElemType: types.StringType}, Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "iam_role_arn": { // Property: IamRoleArn // CloudFormation resource type schema: // { // "description": "The ARN of the IAM role that defines the permissions for AWS Chatbot", // "pattern": "", // "type": "string" // } Description: "The ARN of the IAM role that defines the permissions for AWS Chatbot", Type: types.StringType, Required: true, }, "logging_level": { // Property: LoggingLevel // CloudFormation resource type schema: // { // "default": "NONE", // "description": "Specifies the logging level for this configuration:ERROR,INFO or NONE. This property affects the log entries pushed to Amazon CloudWatch logs", // "pattern": "^(ERROR|INFO|NONE)$", // "type": "string" // } Description: "Specifies the logging level for this configuration:ERROR,INFO or NONE. This property affects the log entries pushed to Amazon CloudWatch logs", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringMatch(regexp.MustCompile("^(ERROR|INFO|NONE)$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.String{Value: "NONE"}), tfsdk.UseStateForUnknown(), }, }, "slack_channel_id": { // Property: SlackChannelId // CloudFormation resource type schema: // { // "description": "The id of the Slack channel", // "maxLength": 256, // "minLength": 1, // "pattern": "^[A-Za-z0-9]+$", // "type": "string" // } Description: "The id of the Slack channel", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), validate.StringMatch(regexp.MustCompile("^[A-Za-z0-9]+$"), ""), }, }, "slack_workspace_id": { // Property: SlackWorkspaceId // CloudFormation resource type schema: // { // "description": "The id of the Slack workspace", // "maxLength": 256, // "minLength": 1, // "pattern": "^[0-9A-Z]{1,255}$", // "type": "string" // } Description: "The id of the Slack workspace", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), validate.StringMatch(regexp.MustCompile("^[0-9A-Z]{1,255}$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "sns_topic_arns": { // Property: SnsTopicArns // CloudFormation resource type schema: // { // "description": "ARNs of SNS topics which delivers notifications to AWS Chatbot, for example CloudWatch alarm notifications.", // "insertionOrder": false, // "items": { // "pattern": "", // "type": "string" // }, // "type": "array" // } Description: "ARNs of SNS topics which delivers notifications to AWS Chatbot, for example CloudWatch alarm notifications.", Type: types.ListType{ElemType: types.StringType}, Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "user_role_required": { // Property: UserRoleRequired // CloudFormation resource type schema: // { // "default": false, // "description": "Enables use of a user role requirement in your chat configuration", // "type": "boolean" // } Description: "Enables use of a user role requirement in your chat configuration", Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ DefaultValue(types.Bool{Value: false}), tfsdk.UseStateForUnknown(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource schema for AWS::Chatbot::SlackChannelConfiguration.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Chatbot::SlackChannelConfiguration").WithTerraformTypeName("awscc_chatbot_slack_channel_configuration") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "configuration_name": "ConfigurationName", "guardrail_policies": "GuardrailPolicies", "iam_role_arn": "IamRoleArn", "logging_level": "LoggingLevel", "slack_channel_id": "SlackChannelId", "slack_workspace_id": "SlackWorkspaceId", "sns_topic_arns": "SnsTopicArns", "user_role_required": "UserRoleRequired", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }