initial commit
This commit is contained in:
86
sdk/python/pulumi_xyz/get_data_source.py
generated
Normal file
86
sdk/python/pulumi_xyz/get_data_source.py
generated
Normal file
@@ -0,0 +1,86 @@
|
||||
# coding=utf-8
|
||||
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
import builtins
|
||||
import copy
|
||||
import warnings
|
||||
import sys
|
||||
import pulumi
|
||||
import pulumi.runtime
|
||||
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
||||
if sys.version_info >= (3, 11):
|
||||
from typing import NotRequired, TypedDict, TypeAlias
|
||||
else:
|
||||
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
||||
from . import _utilities
|
||||
|
||||
__all__ = [
|
||||
'GetDataSourceResult',
|
||||
'AwaitableGetDataSourceResult',
|
||||
'get_data_source',
|
||||
'get_data_source_output',
|
||||
]
|
||||
|
||||
@pulumi.output_type
|
||||
class GetDataSourceResult:
|
||||
"""
|
||||
A collection of values returned by getDataSource.
|
||||
"""
|
||||
def __init__(__self__, id=None, sample_attribute=None):
|
||||
if id and not isinstance(id, str):
|
||||
raise TypeError("Expected argument 'id' to be a str")
|
||||
pulumi.set(__self__, "id", id)
|
||||
if sample_attribute and not isinstance(sample_attribute, str):
|
||||
raise TypeError("Expected argument 'sample_attribute' to be a str")
|
||||
pulumi.set(__self__, "sample_attribute", sample_attribute)
|
||||
|
||||
@property
|
||||
@pulumi.getter
|
||||
def id(self) -> builtins.str:
|
||||
"""
|
||||
The provider-assigned unique ID for this managed resource.
|
||||
"""
|
||||
return pulumi.get(self, "id")
|
||||
|
||||
@property
|
||||
@pulumi.getter(name="sampleAttribute")
|
||||
def sample_attribute(self) -> builtins.str:
|
||||
return pulumi.get(self, "sample_attribute")
|
||||
|
||||
|
||||
class AwaitableGetDataSourceResult(GetDataSourceResult):
|
||||
# pylint: disable=using-constant-test
|
||||
def __await__(self):
|
||||
if False:
|
||||
yield self
|
||||
return GetDataSourceResult(
|
||||
id=self.id,
|
||||
sample_attribute=self.sample_attribute)
|
||||
|
||||
|
||||
def get_data_source(sample_attribute: Optional[builtins.str] = None,
|
||||
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDataSourceResult:
|
||||
"""
|
||||
Use this data source to access information about an existing resource.
|
||||
"""
|
||||
__args__ = dict()
|
||||
__args__['sampleAttribute'] = sample_attribute
|
||||
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
||||
__ret__ = pulumi.runtime.invoke('xyz:index/getDataSource:getDataSource', __args__, opts=opts, typ=GetDataSourceResult).value
|
||||
|
||||
return AwaitableGetDataSourceResult(
|
||||
id=pulumi.get(__ret__, 'id'),
|
||||
sample_attribute=pulumi.get(__ret__, 'sample_attribute'))
|
||||
def get_data_source_output(sample_attribute: Optional[pulumi.Input[builtins.str]] = None,
|
||||
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetDataSourceResult]:
|
||||
"""
|
||||
Use this data source to access information about an existing resource.
|
||||
"""
|
||||
__args__ = dict()
|
||||
__args__['sampleAttribute'] = sample_attribute
|
||||
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
||||
__ret__ = pulumi.runtime.invoke_output('xyz:index/getDataSource:getDataSource', __args__, opts=opts, typ=GetDataSourceResult)
|
||||
return __ret__.apply(lambda __response__: GetDataSourceResult(
|
||||
id=pulumi.get(__response__, 'id'),
|
||||
sample_attribute=pulumi.get(__response__, 'sample_attribute')))
|
||||
Reference in New Issue
Block a user