# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

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__ = ['MaintenanceWindowTaskArgs', 'MaintenanceWindowTask']

@pulumi.input_type
class MaintenanceWindowTaskArgs:
    def __init__(__self__, *,
                 priority: pulumi.Input[int],
                 task_arn: pulumi.Input[str],
                 task_type: pulumi.Input[str],
                 window_id: pulumi.Input[str],
                 description: Optional[pulumi.Input[str]] = None,
                 logging_info: Optional[pulumi.Input['MaintenanceWindowTaskLoggingInfoArgs']] = None,
                 max_concurrency: Optional[pulumi.Input[str]] = None,
                 max_errors: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 service_role_arn: Optional[pulumi.Input[str]] = None,
                 targets: Optional[pulumi.Input[Sequence[pulumi.Input['MaintenanceWindowTaskTargetArgs']]]] = None,
                 task_invocation_parameters: Optional[pulumi.Input['MaintenanceWindowTaskTaskInvocationParametersArgs']] = None,
                 task_parameters: Optional[Any] = None):
        """
        The set of arguments for constructing a MaintenanceWindowTask resource.
        """
        pulumi.set(__self__, "priority", priority)
        pulumi.set(__self__, "task_arn", task_arn)
        pulumi.set(__self__, "task_type", task_type)
        pulumi.set(__self__, "window_id", window_id)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if logging_info is not None:
            pulumi.set(__self__, "logging_info", logging_info)
        if max_concurrency is not None:
            pulumi.set(__self__, "max_concurrency", max_concurrency)
        if max_errors is not None:
            pulumi.set(__self__, "max_errors", max_errors)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if service_role_arn is not None:
            pulumi.set(__self__, "service_role_arn", service_role_arn)
        if targets is not None:
            pulumi.set(__self__, "targets", targets)
        if task_invocation_parameters is not None:
            pulumi.set(__self__, "task_invocation_parameters", task_invocation_parameters)
        if task_parameters is not None:
            pulumi.set(__self__, "task_parameters", task_parameters)

    @property
    @pulumi.getter
    def priority(self) -> pulumi.Input[int]:
        return pulumi.get(self, "priority")

    @priority.setter
    def priority(self, value: pulumi.Input[int]):
        pulumi.set(self, "priority", value)

    @property
    @pulumi.getter(name="taskArn")
    def task_arn(self) -> pulumi.Input[str]:
        return pulumi.get(self, "task_arn")

    @task_arn.setter
    def task_arn(self, value: pulumi.Input[str]):
        pulumi.set(self, "task_arn", value)

    @property
    @pulumi.getter(name="taskType")
    def task_type(self) -> pulumi.Input[str]:
        return pulumi.get(self, "task_type")

    @task_type.setter
    def task_type(self, value: pulumi.Input[str]):
        pulumi.set(self, "task_type", value)

    @property
    @pulumi.getter(name="windowId")
    def window_id(self) -> pulumi.Input[str]:
        return pulumi.get(self, "window_id")

    @window_id.setter
    def window_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "window_id", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="loggingInfo")
    def logging_info(self) -> Optional[pulumi.Input['MaintenanceWindowTaskLoggingInfoArgs']]:
        return pulumi.get(self, "logging_info")

    @logging_info.setter
    def logging_info(self, value: Optional[pulumi.Input['MaintenanceWindowTaskLoggingInfoArgs']]):
        pulumi.set(self, "logging_info", value)

    @property
    @pulumi.getter(name="maxConcurrency")
    def max_concurrency(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "max_concurrency")

    @max_concurrency.setter
    def max_concurrency(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "max_concurrency", value)

    @property
    @pulumi.getter(name="maxErrors")
    def max_errors(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "max_errors")

    @max_errors.setter
    def max_errors(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "max_errors", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter(name="serviceRoleArn")
    def service_role_arn(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "service_role_arn")

    @service_role_arn.setter
    def service_role_arn(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "service_role_arn", value)

    @property
    @pulumi.getter
    def targets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MaintenanceWindowTaskTargetArgs']]]]:
        return pulumi.get(self, "targets")

    @targets.setter
    def targets(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MaintenanceWindowTaskTargetArgs']]]]):
        pulumi.set(self, "targets", value)

    @property
    @pulumi.getter(name="taskInvocationParameters")
    def task_invocation_parameters(self) -> Optional[pulumi.Input['MaintenanceWindowTaskTaskInvocationParametersArgs']]:
        return pulumi.get(self, "task_invocation_parameters")

    @task_invocation_parameters.setter
    def task_invocation_parameters(self, value: Optional[pulumi.Input['MaintenanceWindowTaskTaskInvocationParametersArgs']]):
        pulumi.set(self, "task_invocation_parameters", value)

    @property
    @pulumi.getter(name="taskParameters")
    def task_parameters(self) -> Optional[Any]:
        return pulumi.get(self, "task_parameters")

    @task_parameters.setter
    def task_parameters(self, value: Optional[Any]):
        pulumi.set(self, "task_parameters", value)


warnings.warn("""MaintenanceWindowTask is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""", DeprecationWarning)


class MaintenanceWindowTask(pulumi.CustomResource):
    warnings.warn("""MaintenanceWindowTask is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""", DeprecationWarning)

    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 logging_info: Optional[pulumi.Input[pulumi.InputType['MaintenanceWindowTaskLoggingInfoArgs']]] = None,
                 max_concurrency: Optional[pulumi.Input[str]] = None,
                 max_errors: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[int]] = None,
                 service_role_arn: Optional[pulumi.Input[str]] = None,
                 targets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MaintenanceWindowTaskTargetArgs']]]]] = None,
                 task_arn: Optional[pulumi.Input[str]] = None,
                 task_invocation_parameters: Optional[pulumi.Input[pulumi.InputType['MaintenanceWindowTaskTaskInvocationParametersArgs']]] = None,
                 task_parameters: Optional[Any] = None,
                 task_type: Optional[pulumi.Input[str]] = None,
                 window_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Resource Type definition for AWS::SSM::MaintenanceWindowTask

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: MaintenanceWindowTaskArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Resource Type definition for AWS::SSM::MaintenanceWindowTask

        :param str resource_name: The name of the resource.
        :param MaintenanceWindowTaskArgs 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(MaintenanceWindowTaskArgs, 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,
                 description: Optional[pulumi.Input[str]] = None,
                 logging_info: Optional[pulumi.Input[pulumi.InputType['MaintenanceWindowTaskLoggingInfoArgs']]] = None,
                 max_concurrency: Optional[pulumi.Input[str]] = None,
                 max_errors: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 priority: Optional[pulumi.Input[int]] = None,
                 service_role_arn: Optional[pulumi.Input[str]] = None,
                 targets: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MaintenanceWindowTaskTargetArgs']]]]] = None,
                 task_arn: Optional[pulumi.Input[str]] = None,
                 task_invocation_parameters: Optional[pulumi.Input[pulumi.InputType['MaintenanceWindowTaskTaskInvocationParametersArgs']]] = None,
                 task_parameters: Optional[Any] = None,
                 task_type: Optional[pulumi.Input[str]] = None,
                 window_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        pulumi.log.warn("""MaintenanceWindowTask is deprecated: MaintenanceWindowTask is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""")
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        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__ = MaintenanceWindowTaskArgs.__new__(MaintenanceWindowTaskArgs)

            __props__.__dict__["description"] = description
            __props__.__dict__["logging_info"] = logging_info
            __props__.__dict__["max_concurrency"] = max_concurrency
            __props__.__dict__["max_errors"] = max_errors
            __props__.__dict__["name"] = name
            if priority is None and not opts.urn:
                raise TypeError("Missing required property 'priority'")
            __props__.__dict__["priority"] = priority
            __props__.__dict__["service_role_arn"] = service_role_arn
            __props__.__dict__["targets"] = targets
            if task_arn is None and not opts.urn:
                raise TypeError("Missing required property 'task_arn'")
            __props__.__dict__["task_arn"] = task_arn
            __props__.__dict__["task_invocation_parameters"] = task_invocation_parameters
            __props__.__dict__["task_parameters"] = task_parameters
            if task_type is None and not opts.urn:
                raise TypeError("Missing required property 'task_type'")
            __props__.__dict__["task_type"] = task_type
            if window_id is None and not opts.urn:
                raise TypeError("Missing required property 'window_id'")
            __props__.__dict__["window_id"] = window_id
        super(MaintenanceWindowTask, __self__).__init__(
            'aws-native:ssm:MaintenanceWindowTask',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None) -> 'MaintenanceWindowTask':
        """
        Get an existing MaintenanceWindowTask 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.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = MaintenanceWindowTaskArgs.__new__(MaintenanceWindowTaskArgs)

        __props__.__dict__["description"] = None
        __props__.__dict__["logging_info"] = None
        __props__.__dict__["max_concurrency"] = None
        __props__.__dict__["max_errors"] = None
        __props__.__dict__["name"] = None
        __props__.__dict__["priority"] = None
        __props__.__dict__["service_role_arn"] = None
        __props__.__dict__["targets"] = None
        __props__.__dict__["task_arn"] = None
        __props__.__dict__["task_invocation_parameters"] = None
        __props__.__dict__["task_parameters"] = None
        __props__.__dict__["task_type"] = None
        __props__.__dict__["window_id"] = None
        return MaintenanceWindowTask(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="loggingInfo")
    def logging_info(self) -> pulumi.Output[Optional['outputs.MaintenanceWindowTaskLoggingInfo']]:
        return pulumi.get(self, "logging_info")

    @property
    @pulumi.getter(name="maxConcurrency")
    def max_concurrency(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "max_concurrency")

    @property
    @pulumi.getter(name="maxErrors")
    def max_errors(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "max_errors")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def priority(self) -> pulumi.Output[int]:
        return pulumi.get(self, "priority")

    @property
    @pulumi.getter(name="serviceRoleArn")
    def service_role_arn(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "service_role_arn")

    @property
    @pulumi.getter
    def targets(self) -> pulumi.Output[Optional[Sequence['outputs.MaintenanceWindowTaskTarget']]]:
        return pulumi.get(self, "targets")

    @property
    @pulumi.getter(name="taskArn")
    def task_arn(self) -> pulumi.Output[str]:
        return pulumi.get(self, "task_arn")

    @property
    @pulumi.getter(name="taskInvocationParameters")
    def task_invocation_parameters(self) -> pulumi.Output[Optional['outputs.MaintenanceWindowTaskTaskInvocationParameters']]:
        return pulumi.get(self, "task_invocation_parameters")

    @property
    @pulumi.getter(name="taskParameters")
    def task_parameters(self) -> pulumi.Output[Optional[Any]]:
        return pulumi.get(self, "task_parameters")

    @property
    @pulumi.getter(name="taskType")
    def task_type(self) -> pulumi.Output[str]:
        return pulumi.get(self, "task_type")

    @property
    @pulumi.getter(name="windowId")
    def window_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "window_id")

