Skip to content

Commit

Permalink
Merge pull request #1015 from hashicorp/f-06-23-2023-provider.definit…
Browse files Browse the repository at this point in the history
…ion.schema-update

06/23/2023 AWS CloudFormation Resource Provider Definition Schema
  • Loading branch information
ewbankkit authored Jun 23, 2023
2 parents 32568ca + fbe4e15 commit 2a29727
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 45 deletions.
4 changes: 2 additions & 2 deletions docs/data-sources/logs_log_stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Data Source schema for AWS::Logs::LogStream

### Read-Only

- `log_group_name` (String)
- `log_stream_name` (String)
- `log_group_name` (String) The name of the log group where the log stream is created.
- `log_stream_name` (String) The name of the log stream. The name must be unique wihtin the log group.
6 changes: 3 additions & 3 deletions docs/resources/logs_log_stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Resource Type definition for AWS::Logs::LogStream

### Required

- `log_group_name` (String)
- `log_group_name` (String) The name of the log group where the log stream is created.

### Optional

- `log_stream_name` (String)
- `log_stream_name` (String) The name of the log stream. The name must be unique wihtin the log group.

### Read-Only

- `id` (String) The ID of this resource.
- `id` (String) Uniquely identifies the resource.

## Import

Expand Down
33 changes: 16 additions & 17 deletions internal/aws/logs/log_stream_resource_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions internal/aws/logs/log_stream_resource_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 6 additions & 12 deletions internal/aws/logs/log_stream_singular_data_source_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,57 @@
"title": "CloudFormation Resource Provider Definition MetaSchema",
"description": "This schema validates a CloudFormation resource provider definition.",
"definitions": {
"handlerSchema": {
"type": "object",
"properties": {
"properties": {
"$ref": "file://./base.definition.schema.v1.json#/properties/properties"
},
"required": {
"$ref": "file://./base.definition.schema.v1.json#/properties/required"
},
"allOf": {
"$ref": "file://./base.definition.schema.v1.json#/definitions/schemaArray"
},
"anyOf": {
"$ref": "file://./base.definition.schema.v1.json#/definitions/schemaArray"
},
"oneOf": {
"$ref": "file://./base.definition.schema.v1.json#/definitions/schemaArray"
}
},
"required": [
"properties"
],
"additionalProperties": false
},
"handlerDefinitionWithSchemaOverride": {
"description": "Defines any execution operations which can be performed on this resource provider",
"type": "object",
"properties": {
"handlerSchema": {
"$ref": "#/definitions/handlerSchema"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"additionalItems": false
},
"timeoutInMinutes": {
"description": "Defines the timeout for the entire operation to be interpreted by the invoker of the handler. The default is 120 (2 hours).",
"type": "integer",
"minimum": 2,
"maximum": 2160,
"default": 120
}
},
"additionalProperties": false,
"required": [
"permissions"
]
},
"handlerDefinition": {
"description": "Defines any execution operations which can be performed on this resource provider",
"type": "object",
Expand Down Expand Up @@ -145,6 +196,13 @@
"description": "A reference to the Tags property in the schema.",
"$ref": "http://json-schema.org/draft-07/schema#/properties/$ref",
"default": "/properties/Tags"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
},
"additionalItems": false
}
},
"required": [
Expand Down Expand Up @@ -183,7 +241,7 @@
"$ref": "#/definitions/handlerDefinition"
},
"list": {
"$ref": "#/definitions/handlerDefinition"
"$ref": "#/definitions/handlerDefinitionWithSchemaOverride"
}
},
"additionalProperties": false
Expand All @@ -204,6 +262,14 @@
"description": "A list of JSON pointers for properties that can only be updated under certain conditions. For example, you can upgrade the engine version of an RDS DBInstance but you cannot downgrade it. When updating this property for a resource in a CloudFormation stack, the resource will be replaced if it cannot be updated.",
"$ref": "file://./base.definition.schema.v1.json#/definitions/jsonPointerArray"
},
"nonPublicProperties": {
"description": "A list of JSON pointers for properties that are hidden. These properties will still be used but will not be visible",
"$ref": "file://./base.definition.schema.v1.json#/definitions/jsonPointerArray"
},
"nonPublicDefinitions": {
"description": "A list of JSON pointers for definitions that are hidden. These definitions will still be used but will not be visible",
"$ref": "file://./base.definition.schema.v1.json#/definitions/jsonPointerArray"
},
"createOnlyProperties": {
"description": "A list of JSON pointers to properties that are only able to be specified by the customer when creating a resource. Conversely, any property *not* in this list can be applied to an Update request.",
"$ref": "file://./base.definition.schema.v1.json#/definitions/jsonPointerArray"
Expand Down
10 changes: 9 additions & 1 deletion internal/service/cloudformation/schemas/AWS_Logs_LogGroup.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,15 @@
"permissions": [
"logs:DescribeLogGroups",
"logs:ListTagsLogGroup"
]
],
"handlerSchema": {
"properties": {
"LogGroupName": {
"$ref": "resource-schema.json#/properties/LogGroupName"
}
},
"required": []
}
}
},
"createOnlyProperties": [
Expand Down
51 changes: 42 additions & 9 deletions internal/service/cloudformation/schemas/AWS_Logs_LogStream.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
{
"typeName": "AWS::Logs::LogStream",
"description": "Resource Type definition for AWS::Logs::LogStream",
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-logs.git",
"additionalProperties": false,
"properties": {
"Id": {
"type": "string"
},
"LogGroupName": {
"type": "string"
"type": "string",
"description": "The name of the log group where the log stream is created."
},
"LogStreamName": {
"type": "string"
"type": "string",
"description": "The name of the log stream. The name must be unique wihtin the log group."
}
},
"tagging": {
"taggable": false
},
"required": [
"LogGroupName"
],
Expand All @@ -21,9 +24,39 @@
"/properties/LogStreamName"
],
"primaryIdentifier": [
"/properties/Id"
"/properties/LogGroupName",
"/properties/LogStreamName"
],
"readOnlyProperties": [
"/properties/Id"
]
"handlers": {
"create": {
"permissions": [
"logs:CreateLogStream"
]
},
"read": {
"permissions": [
"logs:DescribeLogStreams"
]
},
"delete": {
"permissions": [
"logs:DeleteLogStream"
]
},
"list": {
"permissions": [
"logs:DescribeLogStreams"
],
"handlerSchema": {
"properties": {
"LogGroupName": {
"$ref": "resource-schema.json#/properties/LogGroupName"
}
},
"required": [
"LogGroupName"
]
}
}
}
}

0 comments on commit 2a29727

Please sign in to comment.