How to use the pulumi.runtime.invoke 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_alias.py View on Github external
order_flowers_prod = aws.lex.get_bot_alias(bot_name="OrderFlowers",
        name="OrderFlowersProd")
    ```


    :param str bot_name: The name of the bot.
    :param str name: The name of the bot alias. The name is case sensitive.
    """
    __args__ = dict()
    __args__['botName'] = bot_name
    __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:lex/getBotAlias:getBotAlias', __args__, opts=opts, typ=GetBotAliasResult).value

    return AwaitableGetBotAliasResult(
        arn=__ret__.arn,
        bot_name=__ret__.bot_name,
        bot_version=__ret__.bot_version,
        checksum=__ret__.checksum,
        created_date=__ret__.created_date,
        description=__ret__.description,
        id=__ret__.id,
        last_updated_date=__ret__.last_updated_date,
        name=__ret__.name)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / storagegateway / get_local_disk.py View on Github external
```


    :param str disk_node: The device node of the local disk to retrieve. For example, `/dev/sdb`.
    :param str disk_path: The device path of the local disk to retrieve. For example, `/dev/xvdb` or `/dev/nvme1n1`.
    :param str gateway_arn: The Amazon Resource Name (ARN) of the gateway.
    """
    __args__ = dict()
    __args__['diskNode'] = disk_node
    __args__['diskPath'] = disk_path
    __args__['gatewayArn'] = gateway_arn
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:storagegateway/getLocalDisk:getLocalDisk', __args__, opts=opts, typ=GetLocalDiskResult).value

    return AwaitableGetLocalDiskResult(
        disk_id=__ret__.disk_id,
        disk_node=__ret__.disk_node,
        disk_path=__ret__.disk_path,
        gateway_arn=__ret__.gateway_arn,
        id=__ret__.id)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / codeartifact / get_repository_endpoint.py View on Github external
:param str domain: The name of the domain that contains the repository.
    :param str domain_owner: The account number of the AWS account that owns the domain.
    :param str format: Which endpoint of a repository to return. A repository has one endpoint for each package format: `npm`, `pypi`, `maven`, and `nuget`.
    :param str repository: The name of the repository.
    """
    __args__ = dict()
    __args__['domain'] = domain
    __args__['domainOwner'] = domain_owner
    __args__['format'] = format
    __args__['repository'] = repository
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:codeartifact/getRepositoryEndpoint:getRepositoryEndpoint', __args__, opts=opts, typ=GetRepositoryEndpointResult).value

    return AwaitableGetRepositoryEndpointResult(
        domain=__ret__.domain,
        domain_owner=__ret__.domain_owner,
        format=__ret__.format,
        id=__ret__.id,
        repository=__ret__.repository,
        repository_endpoint=__ret__.repository_endpoint)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / autoscaling / get_group.py View on Github external
import pulumi
    import pulumi_aws as aws

    foo = aws.autoscaling.get_group(name="foo")
    ```


    :param str name: Specify the exact name of the desired autoscaling group.
    """
    __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:autoscaling/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult).value

    return AwaitableGetGroupResult(
        arn=__ret__.arn,
        availability_zones=__ret__.availability_zones,
        default_cooldown=__ret__.default_cooldown,
        desired_capacity=__ret__.desired_capacity,
        health_check_grace_period=__ret__.health_check_grace_period,
        health_check_type=__ret__.health_check_type,
        id=__ret__.id,
        launch_configuration=__ret__.launch_configuration,
        launch_templates=__ret__.launch_templates,
        load_balancers=__ret__.load_balancers,
        max_size=__ret__.max_size,
        min_size=__ret__.min_size,
        name=__ret__.name,
        new_instances_protected_from_scale_in=__ret__.new_instances_protected_from_scale_in,
github pulumi / pulumi-aws / sdk / python / pulumi_aws / rds / get_instance.py View on Github external
import pulumi_aws as aws

    database = aws.rds.get_instance(db_instance_identifier="my-test-database")
    ```


    :param str db_instance_identifier: The name of the RDS instance
    """
    __args__ = dict()
    __args__['dbInstanceIdentifier'] = db_instance_identifier
    __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:rds/getInstance:getInstance', __args__, opts=opts, typ=GetInstanceResult).value

    return AwaitableGetInstanceResult(
        address=__ret__.address,
        allocated_storage=__ret__.allocated_storage,
        auto_minor_version_upgrade=__ret__.auto_minor_version_upgrade,
        availability_zone=__ret__.availability_zone,
        backup_retention_period=__ret__.backup_retention_period,
        ca_cert_identifier=__ret__.ca_cert_identifier,
        db_cluster_identifier=__ret__.db_cluster_identifier,
        db_instance_arn=__ret__.db_instance_arn,
        db_instance_class=__ret__.db_instance_class,
        db_instance_identifier=__ret__.db_instance_identifier,
        db_instance_port=__ret__.db_instance_port,
        db_name=__ret__.db_name,
        db_parameter_groups=__ret__.db_parameter_groups,
        db_security_groups=__ret__.db_security_groups,
github pulumi / pulumi-aws / sdk / python / pulumi_aws / elasticbeanstalk / get_solution_stack.py View on Github external
:param bool most_recent: If more than one result is returned, use the most
           recent solution stack.
    :param str name_regex: A regex string to apply to the solution stack list returned
           by AWS. See [Elastic Beanstalk Supported Platforms][beanstalk-platforms] from
           AWS documentation for reference solution stack names.
    """
    __args__ = dict()
    __args__['mostRecent'] = most_recent
    __args__['nameRegex'] = name_regex
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:elasticbeanstalk/getSolutionStack:getSolutionStack', __args__, opts=opts, typ=GetSolutionStackResult).value

    return AwaitableGetSolutionStackResult(
        id=__ret__.id,
        most_recent=__ret__.most_recent,
        name=__ret__.name,
        name_regex=__ret__.name_regex)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / ssoadmin / get_permission_set.py View on Github external
:param str arn: The Amazon Resource Name (ARN) of the permission set.
    :param str instance_arn: The Amazon Resource Name (ARN) of the SSO Instance associated with the permission set.
    :param str name: The name of the SSO Permission Set.
    :param Mapping[str, str] tags: Key-value map of resource tags.
    """
    __args__ = dict()
    __args__['arn'] = arn
    __args__['instanceArn'] = instance_arn
    __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:ssoadmin/getPermissionSet:getPermissionSet', __args__, opts=opts, typ=GetPermissionSetResult).value

    return AwaitableGetPermissionSetResult(
        arn=__ret__.arn,
        created_date=__ret__.created_date,
        description=__ret__.description,
        id=__ret__.id,
        instance_arn=__ret__.instance_arn,
        name=__ret__.name,
        relay_state=__ret__.relay_state,
        session_duration=__ret__.session_duration,
        tags=__ret__.tags)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / ebs / get_snapshot.py View on Github external
:param Sequence[str] restorable_by_user_ids: One or more AWS accounts IDs that can create volumes from the snapshot.
    :param Sequence[str] snapshot_ids: Returns information on a specific snapshot_id.
    :param Mapping[str, str] tags: A map of tags for the resource.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['mostRecent'] = most_recent
    __args__['owners'] = owners
    __args__['restorableByUserIds'] = restorable_by_user_ids
    __args__['snapshotIds'] = snapshot_ids
    __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:ebs/getSnapshot:getSnapshot', __args__, opts=opts, typ=GetSnapshotResult).value

    return AwaitableGetSnapshotResult(
        arn=__ret__.arn,
        data_encryption_key_id=__ret__.data_encryption_key_id,
        description=__ret__.description,
        encrypted=__ret__.encrypted,
        filters=__ret__.filters,
        id=__ret__.id,
        kms_key_id=__ret__.kms_key_id,
        most_recent=__ret__.most_recent,
        owner_alias=__ret__.owner_alias,
        owner_id=__ret__.owner_id,
        owners=__ret__.owners,
        restorable_by_user_ids=__ret__.restorable_by_user_ids,
        snapshot_id=__ret__.snapshot_id,
        snapshot_ids=__ret__.snapshot_ids,
github pulumi / pulumi-aws / sdk / python / pulumi_aws / ec2 / get_instance_type_offerings.py View on Github external
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInstanceTypeOfferingsResult:
    """
    Information about EC2 Instance Type Offerings.


    :param Sequence[pulumi.InputType['GetInstanceTypeOfferingsFilterArgs']] filters: One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstanceTypeOfferings.html) for supported filters. Detailed below.
    :param str location_type: Location type. Defaults to `region`. Valid values: `availability-zone`, `availability-zone-id`, and `region`.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['locationType'] = location_type
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:ec2/getInstanceTypeOfferings:getInstanceTypeOfferings', __args__, opts=opts, typ=GetInstanceTypeOfferingsResult).value

    return AwaitableGetInstanceTypeOfferingsResult(
        filters=__ret__.filters,
        id=__ret__.id,
        instance_types=__ret__.instance_types,
        location_type=__ret__.location_type)
github pulumi / pulumi-aws / sdk / python / pulumi_aws / s3 / get_bucket_object.py View on Github external
:param str bucket: The name of the bucket to read the object from. Alternatively, an [S3 access point](https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html) ARN can be specified
    :param str key: The full path to the object inside the bucket
    :param Mapping[str, str] tags: A map of tags assigned to the object.
    :param str version_id: Specific version ID of the object returned (defaults to latest version)
    """
    __args__ = dict()
    __args__['bucket'] = bucket
    __args__['key'] = key
    __args__['range'] = range
    __args__['tags'] = tags
    __args__['versionId'] = version_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:s3/getBucketObject:getBucketObject', __args__, opts=opts, typ=GetBucketObjectResult).value

    return AwaitableGetBucketObjectResult(
        body=__ret__.body,
        bucket=__ret__.bucket,
        bucket_key_enabled=__ret__.bucket_key_enabled,
        cache_control=__ret__.cache_control,
        content_disposition=__ret__.content_disposition,
        content_encoding=__ret__.content_encoding,
        content_language=__ret__.content_language,
        content_length=__ret__.content_length,
        content_type=__ret__.content_type,
        etag=__ret__.etag,
        expiration=__ret__.expiration,
        expires=__ret__.expires,
        id=__ret__.id,
        key=__ret__.key,