How to use the pulumi.InvokeOptions 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 / lex / get_bot.py View on Github external
import pulumi
    import pulumi_aws as aws

    order_flowers_bot = aws.lex.get_bot(name="OrderFlowers",
        version="$LATEST")
    ```


    :param str name: The name of the bot. The name is case sensitive.
    :param str version: The version or alias of the bot.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['version'] = version
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:lex/getBot:getBot', __args__, opts=opts, typ=GetBotResult).value

    return AwaitableGetBotResult(
        arn=__ret__.arn,
        checksum=__ret__.checksum,
        child_directed=__ret__.child_directed,
        created_date=__ret__.created_date,
        description=__ret__.description,
        detect_sentiment=__ret__.detect_sentiment,
        enable_model_improvements=__ret__.enable_model_improvements,
        failure_reason=__ret__.failure_reason,
        id=__ret__.id,
        idle_session_ttl_in_seconds=__ret__.idle_session_ttl_in_seconds,
        last_updated_date=__ret__.last_updated_date,
github pulumi / pulumi-kubernetes / provider / pkg / gen / python-templates / helm / v2 / helm.py View on Github external
apiversions_arg = [f'--api-versions={version}' for version in config.api_versions] if config.api_versions else []
    namespace_arg = ['--namespace', config.namespace] if config.namespace else []
    crd_arg = ['--include-crds'] if _is_helm_v3() else []

    # Use 'helm template' to create a combined YAML manifest.
    cmd = ['helm', 'template', chart, '--name-template', release_name,
           '--values', default_values, '--values', overrides_filename]
    cmd.extend(apiversions_arg)
    cmd.extend(namespace_arg)
    cmd.extend(crd_arg)

    chart_resources = pulumi.Output.all(cmd, data).apply(_run_helm_cmd)

    # Rather than using the default provider for the following invoke call, use the version specified
    # in package.json.
    invoke_opts = pulumi.InvokeOptions(version=_utilities.get_version())

    objects = chart_resources.apply(
        lambda text: pulumi.runtime.invoke('kubernetes:yaml:decode', {
            'text': text, 'defaultNamespace': config.namespace}, invoke_opts).value['result'])

    # Parse the manifest and create the specified resources.
    resources = objects.apply(
        lambda objects: _parse_yaml_document(objects, opts, config.transformations))

    pulumi.Output.all(file, chart_dir, resources).apply(_cleanup_temp_dir)
    return resources
github pulumi / pulumi-aws / sdk / python / pulumi_aws / identitystore / get_group.py View on Github external
identity_store_id: Optional[str] = None,
              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupResult:
    """
    Use this data source to get an Identity Store Group.


    :param Sequence[pulumi.InputType['GetGroupFilterArgs']] filters: Configuration block(s) for filtering. Currently, the AWS Identity Store API supports only 1 filter. Detailed below.
    :param str group_id: The identifier for a group in the Identity Store.
    :param str identity_store_id: The Identity Store ID associated with the Single Sign-On Instance.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['groupId'] = group_id
    __args__['identityStoreId'] = identity_store_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:identitystore/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult).value

    return AwaitableGetGroupResult(
        display_name=__ret__.display_name,
        filters=__ret__.filters,
        group_id=__ret__.group_id,
        id=__ret__.id,
        identity_store_id=__ret__.identity_store_id)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / ec2 / get_launch_configuration.py View on Github external
## Example Usage

    ```python
    import pulumi
    import pulumi_aws as aws

    ubuntu = aws.ec2.get_launch_configuration(name="test-launch-config")
    ```


    :param str name: The name of the launch configuration.
    """
    __args__ = dict()
    __args__['name'] = name
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:ec2/getLaunchConfiguration:getLaunchConfiguration', __args__, opts=opts, typ=GetLaunchConfigurationResult).value

    return AwaitableGetLaunchConfigurationResult(
        arn=__ret__.arn,
        associate_public_ip_address=__ret__.associate_public_ip_address,
        ebs_block_devices=__ret__.ebs_block_devices,
        ebs_optimized=__ret__.ebs_optimized,
        enable_monitoring=__ret__.enable_monitoring,
        ephemeral_block_devices=__ret__.ephemeral_block_devices,
        iam_instance_profile=__ret__.iam_instance_profile,
        id=__ret__.id,
        image_id=__ret__.image_id,
        instance_type=__ret__.instance_type,
        key_name=__ret__.key_name,
github pulumi / pulumi-aws / sdk / python / pulumi_aws / cloudwatch / get_log_group.py View on Github external
```python
    import pulumi
    import pulumi_aws as aws

    example = aws.cloudwatch.get_log_group(name="MyImportantLogs")
    ```


    :param str name: The name of the Cloudwatch log group
    :param Mapping[str, str] tags: A map of tags to assign to the resource.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['tags'] = tags
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:cloudwatch/getLogGroup:getLogGroup', __args__, opts=opts, typ=GetLogGroupResult).value

    return AwaitableGetLogGroupResult(
        arn=__ret__.arn,
        creation_time=__ret__.creation_time,
        id=__ret__.id,
        kms_key_id=__ret__.kms_key_id,
        name=__ret__.name,
        retention_in_days=__ret__.retention_in_days,
        tags=__ret__.tags)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / ec2 / get_network_interfaces.py View on Github external
name="subnet-id",
        values=[aws_subnet["test"]["id"]],
    )])
    pulumi.export("example", example_network_interfaces.ids)
    ```


    :param Sequence[pulumi.InputType['GetNetworkInterfacesFilterArgs']] filters: Custom filter block as described below.
    :param Mapping[str, str] tags: A map of tags, each pair of which must exactly match
           a pair on the desired network interfaces.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['tags'] = tags
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:ec2/getNetworkInterfaces:getNetworkInterfaces', __args__, opts=opts, typ=GetNetworkInterfacesResult).value

    return AwaitableGetNetworkInterfacesResult(
        filters=__ret__.filters,
        id=__ret__.id,
        ids=__ret__.ids,
        tags=__ret__.tags)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / wafv2 / get_web_acl.py View on Github external
import pulumi
    import pulumi_aws as aws

    example = aws.wafv2.get_web_acl(name="some-web-acl",
        scope="REGIONAL")
    ```


    :param str name: The name of the WAFv2 Web ACL.
    :param str scope: Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. To work with CloudFront, you must also specify the region `us-east-1` (N. Virginia) on the AWS provider.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['scope'] = scope
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:wafv2/getWebAcl:getWebAcl', __args__, opts=opts, typ=GetWebAclResult).value

    return AwaitableGetWebAclResult(
        arn=__ret__.arn,
        description=__ret__.description,
        id=__ret__.id,
        name=__ret__.name,
        scope=__ret__.scope)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / dynamodb / get_table.py View on Github external
```python
    import pulumi
    import pulumi_aws as aws

    table_name = aws.dynamodb.get_table(name="tableName")
    ```


    :param str name: The name of the DynamoDB table.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['serverSideEncryption'] = server_side_encryption
    __args__['tags'] = tags
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:dynamodb/getTable:getTable', __args__, opts=opts, typ=GetTableResult).value

    return AwaitableGetTableResult(
        arn=__ret__.arn,
        attributes=__ret__.attributes,
        billing_mode=__ret__.billing_mode,
        global_secondary_indexes=__ret__.global_secondary_indexes,
        hash_key=__ret__.hash_key,
        id=__ret__.id,
        local_secondary_indexes=__ret__.local_secondary_indexes,
        name=__ret__.name,
        point_in_time_recovery=__ret__.point_in_time_recovery,
        range_key=__ret__.range_key,
        read_capacity=__ret__.read_capacity,
github pulumi / pulumi-aws / sdk / python / pulumi_aws / ec2 / get_network_acls.py View on Github external
values=[aws_subnet["test"]["id"]],
        )])
    ```


    :param Sequence[pulumi.InputType['GetNetworkAclsFilterArgs']] filters: Custom filter block as described below.
    :param Mapping[str, str] tags: A map of tags, each pair of which must exactly match
           a pair on the desired network ACLs.
    :param str vpc_id: The VPC ID that you want to filter from.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['tags'] = tags
    __args__['vpcId'] = vpc_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:ec2/getNetworkAcls:getNetworkAcls', __args__, opts=opts, typ=GetNetworkAclsResult).value

    return AwaitableGetNetworkAclsResult(
        filters=__ret__.filters,
        id=__ret__.id,
        ids=__ret__.ids,
        tags=__ret__.tags,
        vpc_id=__ret__.vpc_id)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / imagebuilder / get_infrastructure_configuration.py View on Github external
import pulumi_aws as aws

    example = aws.imagebuilder.get_infrastructure_configuration(arn="arn:aws:imagebuilder:us-west-2:aws:infrastructure-configuration/example")
    ```


    :param str arn: Amazon Resource Name (ARN) of the infrastructure configuration.
    :param Mapping[str, str] resource_tags: Key-value map of resource tags for the infrastructure created by the infrastructure configuration.
    :param Mapping[str, str] tags: Key-value map of resource tags for the infrastructure configuration.
    """
    __args__ = dict()
    __args__['arn'] = arn
    __args__['resourceTags'] = resource_tags
    __args__['tags'] = tags
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:imagebuilder/getInfrastructureConfiguration:getInfrastructureConfiguration', __args__, opts=opts, typ=GetInfrastructureConfigurationResult).value

    return AwaitableGetInfrastructureConfigurationResult(
        arn=__ret__.arn,
        date_created=__ret__.date_created,
        date_updated=__ret__.date_updated,
        description=__ret__.description,
        id=__ret__.id,
        instance_profile_name=__ret__.instance_profile_name,
        instance_types=__ret__.instance_types,
        key_pair=__ret__.key_pair,
        loggings=__ret__.loggings,
        name=__ret__.name,
        resource_tags=__ret__.resource_tags,