-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
get_policy_document.py
82 lines (69 loc) 路 2.86 KB
/
get_policy_document.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from ... import x as _x
__all__ = [
'GetPolicyDocumentResult',
'AwaitableGetPolicyDocumentResult',
'get_policy_document',
'get_policy_document_output',
]
@pulumi.output_type
class GetPolicyDocumentResult:
def __init__(__self__, id=None, json=None, statements=None):
if id and not isinstance(id, str):
raise TypeError("Expected argument 'id' to be a str")
pulumi.set(__self__, "id", id)
if json and not isinstance(json, str):
raise TypeError("Expected argument 'json' to be a str")
pulumi.set(__self__, "json", json)
if statements and not isinstance(statements, list):
raise TypeError("Expected argument 'statements' to be a list")
pulumi.set(__self__, "statements", statements)
@property
@pulumi.getter
def id(self) -> str:
return pulumi.get(self, "id")
@property
@pulumi.getter
def json(self) -> str:
return pulumi.get(self, "json")
@property
@pulumi.getter
def statements(self) -> Optional[Sequence['_x.outputs.GetPolicyDocumentStatementResult']]:
return pulumi.get(self, "statements")
class AwaitableGetPolicyDocumentResult(GetPolicyDocumentResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetPolicyDocumentResult(
id=self.id,
json=self.json,
statements=self.statements)
def get_policy_document(statements: Optional[Sequence[pulumi.InputType['_x.GetPolicyDocumentStatementArgs']]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPolicyDocumentResult:
"""
Use this data source to access information about an existing resource.
"""
__args__ = dict()
__args__['statements'] = statements
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
__ret__ = pulumi.runtime.invoke('aws:x/iam/getPolicyDocument:getPolicyDocument', __args__, opts=opts, typ=GetPolicyDocumentResult).value
return AwaitableGetPolicyDocumentResult(
id=__ret__.id,
json=__ret__.json,
statements=__ret__.statements)
@_utilities.lift_output_func(get_policy_document)
def get_policy_document_output(statements: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['_x.GetPolicyDocumentStatementArgs']]]]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPolicyDocumentResult]:
"""
Use this data source to access information about an existing resource.
"""
...