From 0359760f4740d226815ce8746251cd3e6ca2ffc9 Mon Sep 17 00:00:00 2001 From: EarthmanT Date: Sun, 10 Dec 2017 17:21:04 +0200 Subject: [PATCH] 1.2.0 (#100) * fix nonrecoverable error import ecs * add cloudwatch logs support --- cloudify_awssdk/ecs/resources/service.py | 2 + cloudify_boto3/cloudwatchlogs/__init__.py | 52 +++ .../cloudwatchlogs/resources/__init__.py | 1 + .../cloudwatchlogs/resources/log_group.py | 118 ++++++ .../cloudwatchlogs/resources/log_stream.py | 153 ++++++++ .../cloudwatchlogs/resources/metric_filter.py | 151 ++++++++ .../cloudwatch-logs.yaml | 68 ++++ plugin.yaml | 355 +++++++++++++++++- setup.py | 2 +- 9 files changed, 899 insertions(+), 3 deletions(-) create mode 100644 cloudify_boto3/cloudwatchlogs/__init__.py create mode 100644 cloudify_boto3/cloudwatchlogs/resources/__init__.py create mode 100644 cloudify_boto3/cloudwatchlogs/resources/log_group.py create mode 100644 cloudify_boto3/cloudwatchlogs/resources/log_stream.py create mode 100644 cloudify_boto3/cloudwatchlogs/resources/metric_filter.py create mode 100644 examples/cloudwatch-feature-demo/cloudwatch-logs.yaml diff --git a/cloudify_awssdk/ecs/resources/service.py b/cloudify_awssdk/ecs/resources/service.py index be54e20..fbeba76 100644 --- a/cloudify_awssdk/ecs/resources/service.py +++ b/cloudify_awssdk/ecs/resources/service.py @@ -30,6 +30,8 @@ from cloudify_awssdk.ecs import ECSBase from cloudify_awssdk.common.constants import EXTERNAL_RESOURCE_ID +from cloudify.exceptions import NonRecoverableError + RESOURCE_TYPE = 'ECS Service' CLUSTER = 'cluster' CLUSTER_TYPE = 'cloudify.nodes.aws.ECS.Cluster' diff --git a/cloudify_boto3/cloudwatchlogs/__init__.py b/cloudify_boto3/cloudwatchlogs/__init__.py new file mode 100644 index 0000000..3103d69 --- /dev/null +++ b/cloudify_boto3/cloudwatchlogs/__init__.py @@ -0,0 +1,52 @@ +# ####### +# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +""" + Cloudwatch Logs + ~~~ + AWS Cloudwatch Logs base interface +""" +# Cloudify AWS +from cloudify_boto3.common import AWSResourceBase +from cloudify_boto3.common.connection import Boto3Connection + +# pylint: disable=R0903 + + +class AWSCloudwatchLogsBase(AWSResourceBase): + """ + AWS Cloudwatch Logs interface + """ + def __init__(self, ctx_node, resource_id=None, client=None, logger=None): + AWSResourceBase.__init__( + self, client or Boto3Connection(ctx_node).client('logs'), + resource_id=resource_id, logger=logger) + + @property + def properties(self): + """Gets the properties of an external resource""" + raise NotImplementedError() + + @property + def status(self): + """Gets the status of an external resource""" + raise NotImplementedError() + + def create(self, params): + """Creates a resource""" + raise NotImplementedError() + + def delete(self, params=None): + """Deletes a resource""" + raise NotImplementedError() diff --git a/cloudify_boto3/cloudwatchlogs/resources/__init__.py b/cloudify_boto3/cloudwatchlogs/resources/__init__.py new file mode 100644 index 0000000..11f1a2a --- /dev/null +++ b/cloudify_boto3/cloudwatchlogs/resources/__init__.py @@ -0,0 +1 @@ +# DO NOT REMOVE diff --git a/cloudify_boto3/cloudwatchlogs/resources/log_group.py b/cloudify_boto3/cloudwatchlogs/resources/log_group.py new file mode 100644 index 0000000..2f6cd61 --- /dev/null +++ b/cloudify_boto3/cloudwatchlogs/resources/log_group.py @@ -0,0 +1,118 @@ +# ####### +# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +""" + CloudwatchLogs.log_group + ~~~~~~~~~~~~~~ + AWS Cloudwatch Logs Log Group interface +""" +# Cloudify +from cloudify_boto3.common import decorators, utils +from cloudify_boto3.cloudwatchlogs import AWSCloudwatchLogsBase +# Boto +from botocore.exceptions import ClientError + +RESOURCE_TYPE = 'Cloudwatch Logs Log Group' +RESOURCE_NAME = 'logGroupName' +RESOURCES = 'logGroups' +SEARCH_KEY = 'logGroupNamePrefix' + + +class CloudwatchLogGroup(AWSCloudwatchLogsBase): + """ + AWS AWS Cloudwatch Log Group interface + """ + def __init__(self, ctx_node, resource_id=None, client=None, logger=None): + AWSCloudwatchLogsBase.__init__( + self, ctx_node, resource_id, client, logger) + self.type_name = RESOURCE_TYPE + + @property + def properties(self): + """Gets the properties of an external resource""" + params = {SEARCH_KEY: self.resource_id} + try: + resources = \ + self.client.describe_alarms(**params) + except ClientError: + pass + else: + return resources.get(RESOURCES, [None])[0] + + @property + def status(self): + """Gets the status of an external resource""" + props = self.properties + if not props: + return None + return None + + def create(self, params): + """ + Create a new AWS Cloudwatch Log Group. + """ + self.logger.debug('Creating %s with parameters: %s' + % (self.type_name, params)) + res = self.client.create_log_group(**params) + self.logger.debug('Response: %s' % res) + return res + + def delete(self, params=None): + """ + Deletes an existing AWS Cloudwatch Log Group. + """ + self.logger.debug('Deleting %s with parameters: %s' + % (self.type_name, params)) + res = self.client.delete_log_group(**params) + self.logger.debug('Response: %s' % res) + return res + + +@decorators.aws_resource(resource_type=RESOURCE_TYPE) +def prepare(ctx, resource_config, **_): + """Prepares an AWS Cloudwatch Log Group""" + # Save the parameters + ctx.instance.runtime_properties['resource_config'] = resource_config + + +@decorators.aws_resource(CloudwatchLogGroup, RESOURCE_TYPE) +def create(ctx, iface, resource_config, **_): + """Creates an AWS Cloudwatch Log Group""" + # Create a copy of the resource config for clean manipulation. + params = \ + dict() if not resource_config else resource_config.copy() + resource_id = \ + iface.resource_id or \ + utils.get_resource_id( + ctx.node, + ctx.instance, + params.get(RESOURCE_NAME), + use_instance_id=True) + params[RESOURCE_NAME] = resource_id + utils.update_resource_id(ctx.instance, resource_id) + + # Actually create the resource + iface.create(params) + + +@decorators.aws_resource(CloudwatchLogGroup, RESOURCE_TYPE, + ignore_properties=True) +def delete(iface, resource_config, **_): + """Deletes an AWS Cloudwatch Log Group""" + # Create a copy of the resource config for clean manipulation. + params = \ + dict() if not resource_config else resource_config.copy() + if RESOURCE_NAME not in params.keys(): + params.update({RESOURCE_NAME: iface.resource_id}) + iface.delete(params) diff --git a/cloudify_boto3/cloudwatchlogs/resources/log_stream.py b/cloudify_boto3/cloudwatchlogs/resources/log_stream.py new file mode 100644 index 0000000..9a340da --- /dev/null +++ b/cloudify_boto3/cloudwatchlogs/resources/log_stream.py @@ -0,0 +1,153 @@ +# ####### +# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +""" + CloudwatchLogs.log_stream + ~~~~~~~~~~~~~~ + AWS Cloudwatch Logs Log Stream interface +""" +# Cloudify +from cloudify_boto3.common import decorators, utils, constants +from cloudify_boto3.cloudwatchlogs import AWSCloudwatchLogsBase +# Boto +from botocore.exceptions import ClientError + +RESOURCE_TYPE = 'Cloudwatch Logs Log Stream' +RESOURCE_NAME = 'logStreamName' +RESOURCES = 'logStreams' +SEARCH_KEY = 'logStreamNamePrefix' +PARENT_RESOURCE_NAME = 'logGroupName' + + +class CloudwatchLogStream(AWSCloudwatchLogsBase): + """ + AWS Cloudwatch Log Stream interface + """ + def __init__(self, ctx_node, resource_id=None, client=None, logger=None): + AWSCloudwatchLogsBase.__init__( + self, ctx_node, resource_id, client, logger) + self.type_name = RESOURCE_TYPE + self.parent_resource_name = None + + @property + def properties(self): + """Gets the properties of an external resource""" + if not self.parent_resource_name: + return None + params = {SEARCH_KEY: self.resource_id} + try: + resources = \ + self.client.describe_log_streams(**params) + except ClientError: + pass + else: + return resources.get(RESOURCES, [None])[0] + + @property + def status(self): + """Gets the status of an external resource""" + props = self.properties + if not props: + return None + return None + + def create(self, params): + """ + Create a new AWS Cloudwatch Log Stream. + """ + self.logger.debug('Creating %s with parameters: %s' + % (self.type_name, params)) + res = self.client.create_log_stream(**params) + self.logger.debug('Response: %s' % res) + return res + + def delete(self, params=None): + """ + Deletes an existing AWS Cloudwatch Log Stream. + """ + self.logger.debug('Deleting %s with parameters: %s' + % (self.type_name, params)) + res = self.client.delete_log_stream(**params) + self.logger.debug('Response: %s' % res) + return res + + +@decorators.aws_resource(resource_type=RESOURCE_TYPE) +def prepare(ctx, resource_config, **_): + """Prepares an AWS Cloudwatch Log Stream""" + # Save the parameters + ctx.instance.runtime_properties['resource_config'] = resource_config + + +@decorators.aws_resource(CloudwatchLogStream, RESOURCE_TYPE) +def create(ctx, iface, resource_config, **_): + """Creates an AWS Cloudwatch Log Stream""" + + # Create a copy of the resource config for clean manipulation. + params = \ + dict() if not resource_config else resource_config.copy() + + parent_name = \ + params.get(PARENT_RESOURCE_NAME) + if not parent_name: + parent_node = \ + utils.find_rel_by_type( + ctx.instance, + 'cloudify.relationships.contained_in') + parent_name = \ + parent_node.target.instance.runtime_properties.get( + constants.EXTERNAL_RESOURCE_ID) + setattr(iface, 'parent_resource_name', parent_name) + params[PARENT_RESOURCE_NAME] = parent_name + ctx.instance.runtime_properties[PARENT_RESOURCE_NAME] = \ + parent_name + + resource_id = \ + iface.resource_id or \ + utils.get_resource_id( + ctx.node, + ctx.instance, + params.get(RESOURCE_NAME), + use_instance_id=True) + params[RESOURCE_NAME] = resource_id + utils.update_resource_id(ctx.instance, resource_id) + + # Actually create the resource + iface.create(params) + + +@decorators.aws_resource(CloudwatchLogStream, RESOURCE_TYPE, + ignore_properties=True) +def delete(iface, ctx, resource_config, **_): + """Deletes an AWS Cloudwatch Log Stream""" + # Create a copy of the resource config for clean manipulation. + params = \ + dict() if not resource_config else resource_config.copy() + parent_name = params.get(PARENT_RESOURCE_NAME) + if not parent_name: + parent_node = \ + utils.find_rel_by_type( + ctx.instance, + 'cloudify.relationships.contained_in') + parent_name = \ + parent_node.target.instance.runtime_properties.get( + constants.EXTERNAL_RESOURCE_ID) + setattr(iface, 'parent_resource_name', parent_name) + params[PARENT_RESOURCE_NAME] = parent_name + ctx.instance.runtime_properties[PARENT_RESOURCE_NAME] = \ + parent_name + + if RESOURCE_NAME not in params.keys(): + params.update({RESOURCE_NAME: iface.resource_id}) + iface.delete(params) diff --git a/cloudify_boto3/cloudwatchlogs/resources/metric_filter.py b/cloudify_boto3/cloudwatchlogs/resources/metric_filter.py new file mode 100644 index 0000000..ba7021d --- /dev/null +++ b/cloudify_boto3/cloudwatchlogs/resources/metric_filter.py @@ -0,0 +1,151 @@ +# ####### +# Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +""" + CloudwatchLogs.log_stream + ~~~~~~~~~~~~~~ + AWS Cloudwatch Logs Metric Filter interface +""" +# Cloudify +from cloudify_boto3.common import decorators, utils, constants +from cloudify_boto3.cloudwatchlogs import AWSCloudwatchLogsBase +# Boto +from botocore.exceptions import ClientError + +RESOURCE_TYPE = 'Cloudwatch Logs Metric Filter' +RESOURCE_NAME = 'filterName' +SEARCH_KEY = 'filterNamePrefix' +PARENT_RESOURCE_NAME = 'logGroupName' +RESOURCES = 'metricFilters' + + +class CloudwatchMetricFilter(AWSCloudwatchLogsBase): + """ + AWS Cloudwatch Metric Filter interface + """ + def __init__(self, ctx_node, resource_id=None, client=None, logger=None): + AWSCloudwatchLogsBase.__init__( + self, ctx_node, resource_id, client, logger) + self.type_name = RESOURCE_TYPE + self.parent_resource_name = None + + @property + def properties(self): + """Gets the properties of an external resource""" + if not self.parent_resource_name: + return None + params = {SEARCH_KEY: self.resource_id} + try: + resources = \ + self.client.describe_metric_filters(**params) + except ClientError: + pass + else: + return resources.get(RESOURCES, [None])[0] + + @property + def status(self): + """Gets the status of an external resource""" + props = self.properties + if not props: + return None + return None + + def create(self, params): + """ + Create a new AWS Cloudwatch Metric Filter. + """ + self.logger.debug('Creating %s with parameters: %s' + % (self.type_name, params)) + res = self.client.put_metric_filter(**params) + self.logger.debug('Response: %s' % res) + return res + + def delete(self, params=None): + """ + Deletes an existing AWS Cloudwatch Metric Filter. + """ + self.logger.debug('Deleting %s with parameters: %s' + % (self.type_name, params)) + res = self.client.delete_metric_filter(**params) + self.logger.debug('Response: %s' % res) + return res + + +@decorators.aws_resource(resource_type=RESOURCE_TYPE) +def prepare(ctx, resource_config, **_): + """Prepares an AWS Cloudwatch Metric Filter""" + # Save the parameters + ctx.instance.runtime_properties['resource_config'] = resource_config + + +@decorators.aws_resource(CloudwatchMetricFilter, RESOURCE_TYPE) +def create(ctx, iface, resource_config, **_): + """Creates an AWS Cloudwatch Metric Filter""" + + # Create a copy of the resource config for clean manipulation. + params = \ + dict() if not resource_config else resource_config.copy() + parent_name = params.get(PARENT_RESOURCE_NAME) + if not parent_name: + parent_node = \ + utils.find_rel_by_type( + ctx.instance, + 'cloudify.relationships.contained_in') + parent_name = \ + parent_node.target.instance.runtime_properties.get( + constants.EXTERNAL_RESOURCE_ID) + setattr(iface, 'parent_resource_name', parent_name) + params[PARENT_RESOURCE_NAME] = parent_name + ctx.instance.runtime_properties[PARENT_RESOURCE_NAME] = \ + parent_name + + resource_id = \ + iface.resource_id or \ + utils.get_resource_id( + ctx.node, + ctx.instance, + params.get(RESOURCE_NAME), + use_instance_id=True) + params[RESOURCE_NAME] = resource_id + utils.update_resource_id(ctx.instance, resource_id) + + # Actually create the resource + iface.create(params) + + +@decorators.aws_resource(CloudwatchMetricFilter, RESOURCE_TYPE, + ignore_properties=True) +def delete(iface, ctx, resource_config, **_): + """Deletes an AWS Cloudwatch Metric Filter""" + # Create a copy of the resource config for clean manipulation. + params = \ + dict() if not resource_config else resource_config.copy() + parent_name = params.get(PARENT_RESOURCE_NAME) + if not parent_name: + parent_node = \ + utils.find_rel_by_type( + ctx.instance, + 'cloudify.relationships.contained_in') + parent_name = \ + parent_node.target.instance.runtime_properties.get( + constants.EXTERNAL_RESOURCE_ID) + setattr(iface, 'parent_resource_name', parent_name) + params[PARENT_RESOURCE_NAME] = parent_name + ctx.instance.runtime_properties[PARENT_RESOURCE_NAME] = \ + parent_name + + if RESOURCE_NAME not in params.keys(): + params.update({RESOURCE_NAME: iface.resource_id}) + iface.delete(params) diff --git a/examples/cloudwatch-feature-demo/cloudwatch-logs.yaml b/examples/cloudwatch-feature-demo/cloudwatch-logs.yaml new file mode 100644 index 0000000..777ea64 --- /dev/null +++ b/examples/cloudwatch-feature-demo/cloudwatch-logs.yaml @@ -0,0 +1,68 @@ +tosca_definitions_version: cloudify_dsl_1_3 + +imports: +- https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.1/resources/rest-service/cloudify/types/types.yaml +- http://getcloudify.org.s3.amazonaws.com/spec/aws-plugin/1.4.13/plugin.yaml +- plugin.yaml + +inputs: + + aws_access_key_id: + type: string + default: { get_secret: aws_access_key_id } + + aws_secret_access_key: + type: string + default: { get_secret: aws_secret_access_key } + + aws_region_name: + type: string + default: { get_secret: aws_region_name } + +dsl_definitions: + + client_config: &client_config + aws_access_key_id: { get_input: aws_access_key_id } + aws_secret_access_key: { get_input: aws_secret_access_key } + region_name: { get_input: aws_region_name } + + aws_config: &aws_config + aws_access_key_id: { get_input: aws_access_key_id } + aws_secret_access_key: { get_input: aws_secret_access_key } + ec2_region_name: { get_input: aws_region_name } + +node_templates: + + my_metric_filter: + type: cloudify.nodes.aws.cloudwatchlogs.MetricFilter + properties: + client_config: *client_config + resource_config: + kwargs: + filterPattern: "[ip, identity, user_id, timestamp, request, status_code, size]" + metricTransformations: + - defaultValue: 0 + metricValue: "$size" + metricNamespace: "MyApp" + metricName: "Volume" + relationships: + - type: cloudify.relationships.contained_in + target: my_log_group + + my_log_stream: + type: cloudify.nodes.aws.cloudwatchlogs.LogGroup + properties: + client_config: *client_config + relationships: + - type: cloudify.relationships.contained_in + target: my_log_group + + my_log_group: + type: cloudify.nodes.aws.cloudwatchlogs.LogGroup + properties: + client_config: *client_config + resource_config: + kwargs: + tags: + created_by: cloudify + diff --git a/plugin.yaml b/plugin.yaml index 5d69f50..fa978e4 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -1,9 +1,9 @@ plugins: awssdk: executor: central_deployment_agent - source: https://github.com//cloudify-incubator/cloudify-awssdk-plugin/archive/ecs-add-support-for-cluster-and-service.zip + source: https://github.com//cloudify-incubator/cloudify-awssdk-plugin/archive/1.2.0.zip package_name: cloudify-awssdk-plugin - package_version: '1.1.0' + package_version: '1.2.0' data_types: @@ -358,6 +358,21 @@ data_types: kwargs: default: {} + cloudify.datatypes.aws.cloudwatchlogs.LogGroup.config: + properties: + kwargs: + default: {} + + cloudify.datatypes.aws.cloudwatchlogs.LogStream.config: + properties: + kwargs: + default: {} + + cloudify.datatypes.aws.cloudwatchlogs.MetricFilter.config: + properties: + kwargs: + default: {} + cloudify.datatypes.aws.efs.FileSystem.config: properties: kwargs: @@ -8400,6 +8415,342 @@ node_types: required: false default: {} + cloudify.nodes.aws.cloudwatchlogs.LogStream: + derived_from: cloudify.nodes.Root + properties: + use_external_resource: + description: *use_external_resource_desc + type: boolean + default: false + resource_id: + description: *resource_id_desc + type: string + default: '' + client_config: + description: > + A dictionary of values to pass to authenticate with the AWS API. + type: cloudify.datatypes.aws.ConnectionConfig + required: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + type: cloudify.datatypes.aws.cloudwatchlogs.LogStream.config + required: false + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.log_stream.prepare + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + configure: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.log_stream.create + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + delete: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.log_stream.delete + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + + cloudify.nodes.aws.cloudwatchlogs.LogGroup: + derived_from: cloudify.nodes.Root + properties: + use_external_resource: + description: *use_external_resource_desc + type: boolean + default: false + resource_id: + description: *resource_id_desc + type: string + default: '' + client_config: + description: > + A dictionary of values to pass to authenticate with the AWS API. + type: cloudify.datatypes.aws.ConnectionConfig + required: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + type: cloudify.datatypes.aws.cloudwatchlogs.LogGroup.config + required: false + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.log_group.prepare + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + configure: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.log_group.create + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + delete: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.log_group.delete + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + + cloudify.nodes.aws.cloudwatchlogs.MetricFilter: + derived_from: cloudify.nodes.Root + properties: + use_external_resource: + description: *use_external_resource_desc + type: boolean + default: false + resource_id: + description: *resource_id_desc + type: string + default: '' + client_config: + description: > + A dictionary of values to pass to authenticate with the AWS API. + type: cloudify.datatypes.aws.ConnectionConfig + required: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + type: cloudify.datatypes.aws.cloudwatchlogs.MetricFilter.config + required: false + interfaces: + cloudify.interfaces.lifecycle: + create: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.metric_filter.prepare + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + configure: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.metric_filter.create + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + delete: + implementation: awssdk.cloudify_boto3.cloudwatchlogs.resources.metric_filter.delete + inputs: + aws_resource_id: + description: > + This overrides the resource_id property (useful for setting the + resource ID of a node instance at runtime). + type: string + required: false + default: ~ + runtime_properties: + description: > + This overrides any runtime property at runtime. This is a key-value + pair / dictionary that will be passed, as-is, to the runtime properties + of the running instance. + required: false + default: ~ + force_operation: + description: > + Forces the current operation to be executed regardless + if the "use_external_resource" property is set or not. + required: false + default: false + resource_config: + description: > + Configuration key-value data to be passed as-is to the corresponding + Boto3 method. Key names must match the case that Boto3 requires. + required: false + default: {} + cloudify.nodes.aws.kms.Alias: derived_from: cloudify.nodes.Root properties: diff --git a/setup.py b/setup.py index ca7e934..c902c49 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( name='cloudify-awssdk-plugin', - version='1.1.0', + version='1.2.0', license='LICENSE', packages=find_packages(exclude=['tests*']), description='A Cloudify plugin for AWS',