How to use the pulumi.Alias function in pulumi

To help you get started, we’ve selected a few pulumi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pulumi / pulumi-aws / sdk / python / pulumi_aws / elb / attachment.py View on Github external
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__ = AttachmentArgs.__new__(AttachmentArgs)

            if elb is None and not opts.urn:
                raise TypeError("Missing required property 'elb'")
            __props__.__dict__["elb"] = elb
            if instance is None and not opts.urn:
                raise TypeError("Missing required property 'instance'")
            __props__.__dict__["instance"] = instance
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="aws:elasticloadbalancing/attachment:Attachment")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(Attachment, __self__).__init__(
            'aws:elb/attachment:Attachment',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / lb / target_group.py View on Github external
__props__.__dict__["name"] = name
            __props__.__dict__["name_prefix"] = name_prefix
            __props__.__dict__["port"] = port
            __props__.__dict__["preserve_client_ip"] = preserve_client_ip
            __props__.__dict__["protocol"] = protocol
            __props__.__dict__["protocol_version"] = protocol_version
            __props__.__dict__["proxy_protocol_v2"] = proxy_protocol_v2
            __props__.__dict__["slow_start"] = slow_start
            __props__.__dict__["stickiness"] = stickiness
            __props__.__dict__["tags"] = tags
            __props__.__dict__["tags_all"] = tags_all
            __props__.__dict__["target_type"] = target_type
            __props__.__dict__["vpc_id"] = vpc_id
            __props__.__dict__["arn"] = None
            __props__.__dict__["arn_suffix"] = None
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="aws:elasticloadbalancingv2/targetGroup:TargetGroup")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(TargetGroup, __self__).__init__(
            'aws:lb/targetGroup:TargetGroup',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-kubernetes / sdk / python / pulumi_kubernetes / batch / v1beta1 / CronJob.py View on Github external
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__ = CronJobArgs.__new__(CronJobArgs)

            __props__.__dict__["api_version"] = 'batch/v1beta1'
            __props__.__dict__["kind"] = 'CronJob'
            __props__.__dict__["metadata"] = metadata
            __props__.__dict__["spec"] = spec
            __props__.__dict__["status"] = None
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:batch/v1:CronJob"), pulumi.Alias(type_="kubernetes:batch/v2alpha1:CronJob")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(CronJob, __self__).__init__(
            'kubernetes:batch/v1beta1:CronJob',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-kubernetes / sdk / python / pulumi_kubernetes / scheduling / v1beta1 / PriorityClass.py View on Github external
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__ = PriorityClassArgs.__new__(PriorityClassArgs)

            __props__.__dict__["api_version"] = 'scheduling.k8s.io/v1beta1'
            __props__.__dict__["description"] = description
            __props__.__dict__["global_default"] = global_default
            __props__.__dict__["kind"] = 'PriorityClass'
            __props__.__dict__["metadata"] = metadata
            __props__.__dict__["preemption_policy"] = preemption_policy
            if value is None and not opts.urn:
                raise TypeError("Missing required property 'value'")
            __props__.__dict__["value"] = value
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:scheduling.k8s.io/v1:PriorityClass"), pulumi.Alias(type_="kubernetes:scheduling.k8s.io/v1alpha1:PriorityClass")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(PriorityClass, __self__).__init__(
            'kubernetes:scheduling.k8s.io/v1beta1:PriorityClass',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-kubernetes / sdk / python / pulumi_kubernetes / apps / v1 / DaemonSet.py View on Github external
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__ = DaemonSetArgs.__new__(DaemonSetArgs)

            __props__.__dict__["api_version"] = 'apps/v1'
            __props__.__dict__["kind"] = 'DaemonSet'
            __props__.__dict__["metadata"] = metadata
            __props__.__dict__["spec"] = spec
            __props__.__dict__["status"] = None
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:apps/v1beta2:DaemonSet"), pulumi.Alias(type_="kubernetes:extensions/v1beta1:DaemonSet")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(DaemonSet, __self__).__init__(
            'kubernetes:apps/v1:DaemonSet',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-kubernetes / sdk / python / pulumi_kubernetes / networking / v1 / Ingress.py View on Github external
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__ = IngressArgs.__new__(IngressArgs)

            __props__.__dict__["api_version"] = 'networking.k8s.io/v1'
            __props__.__dict__["kind"] = 'Ingress'
            __props__.__dict__["metadata"] = metadata
            __props__.__dict__["spec"] = spec
            __props__.__dict__["status"] = None
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:extensions/v1beta1:Ingress"), pulumi.Alias(type_="kubernetes:networking.k8s.io/v1beta1:Ingress")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(Ingress, __self__).__init__(
            'kubernetes:networking.k8s.io/v1:Ingress',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-kubernetes / sdk / python / pulumi_kubernetes / apiregistration / v1beta1 / APIServiceList.py View on Github external
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__ = APIServiceListArgs.__new__(APIServiceListArgs)

            __props__.__dict__["api_version"] = 'apiregistration.k8s.io/v1beta1'
            if items is None and not opts.urn:
                raise TypeError("Missing required property 'items'")
            __props__.__dict__["items"] = items
            __props__.__dict__["kind"] = 'APIServiceList'
            __props__.__dict__["metadata"] = metadata
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:apiregistration/v1beta1:APIServiceList")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(APIServiceList, __self__).__init__(
            'kubernetes:apiregistration.k8s.io/v1beta1:APIServiceList',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-kubernetes / sdk / python / pulumi_kubernetes / policy / v1beta1 / PodDisruptionBudget.py View on Github external
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__ = PodDisruptionBudgetArgs.__new__(PodDisruptionBudgetArgs)

            __props__.__dict__["api_version"] = 'policy/v1beta1'
            __props__.__dict__["kind"] = 'PodDisruptionBudget'
            __props__.__dict__["metadata"] = metadata
            __props__.__dict__["spec"] = spec
            __props__.__dict__["status"] = None
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:policy/v1:PodDisruptionBudget")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(PodDisruptionBudget, __self__).__init__(
            'kubernetes:policy/v1beta1:PodDisruptionBudget',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / elb / listener_policy.py View on Github external
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__ = ListenerPolicyArgs.__new__(ListenerPolicyArgs)

            if load_balancer_name is None and not opts.urn:
                raise TypeError("Missing required property 'load_balancer_name'")
            __props__.__dict__["load_balancer_name"] = load_balancer_name
            if load_balancer_port is None and not opts.urn:
                raise TypeError("Missing required property 'load_balancer_port'")
            __props__.__dict__["load_balancer_port"] = load_balancer_port
            __props__.__dict__["policy_names"] = policy_names
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="aws:elasticloadbalancing/listenerPolicy:ListenerPolicy")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(ListenerPolicy, __self__).__init__(
            'aws:elb/listenerPolicy:ListenerPolicy',
            resource_name,
            __props__,
            opts)
github pulumi / pulumi-kubernetes / sdk / python / pulumi_kubernetes / apps / v1 / ControllerRevision.py View on Github external
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__ = ControllerRevisionArgs.__new__(ControllerRevisionArgs)

            __props__.__dict__["api_version"] = 'apps/v1'
            __props__.__dict__["data"] = data
            __props__.__dict__["kind"] = 'ControllerRevision'
            __props__.__dict__["metadata"] = metadata
            if revision is None and not opts.urn:
                raise TypeError("Missing required property 'revision'")
            __props__.__dict__["revision"] = revision
        alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="kubernetes:apps/v1beta1:ControllerRevision"), pulumi.Alias(type_="kubernetes:apps/v1beta2:ControllerRevision")])
        opts = pulumi.ResourceOptions.merge(opts, alias_opts)
        super(ControllerRevision, __self__).__init__(
            'kubernetes:apps/v1:ControllerRevision',
            resource_name,
            __props__,
            opts)