예제 #1
0
파일: __main__.py 프로젝트: 6a6f6a6f/pulumi
 def __init__(self, name):
     CustomResource.__init__(self,
                             "test:index:MyLargeStringResource",
                             name,
                             props={
                                 "largeStringProp": long_string,
                             })
예제 #2
0
 def __init__(self, name, value):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={
                                 "value": value,
                             })
예제 #3
0
 def __init__(self, name, args, opts=None):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={
                                 **args,
                                 "outprop": None,
                             },
                             opts=opts)
예제 #4
0
 def __init__(self, name: str, prop: Input[str]) -> None:
     CustomResource.__init__(
         self, "test:index:TranslatedResource", name, {
             "transformed_prop": prop,
             "recursive_prop": {
                 "recursive_key": "value",
                 "recursive_output": None,
             },
             "engine_output_prop": None,
         })
예제 #5
0
파일: __main__.py 프로젝트: zerojuls/pulumi
    def __init__(self, name, bucket=None):
        if not bucket:
            raise TypeError("bucket is required")

        if not isinstance(bucket, six.string_types):
            raise TypeError("bucket must be a string")

        CustomResource.__init__(self,
                                "test:index:BucketObject",
                                name,
                                props={"bucket": bucket})
예제 #6
0
파일: __main__.py 프로젝트: zerojuls/pulumi
 def __init__(self, name):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={
                                 "falseprop": False,
                                 "trueprop": True,
                                 "intprop": 42,
                                 "listprop": [1, 2, "string", False],
                                 "mapprop": {
                                     "foo": ["bar", "baz"]
                                 }
                             })
예제 #7
0
 def __init__(self, name: str, res: ResourceA) -> None:
     CustomResource.__init__(self, "test:index:ResourceB", name, {
         "other_in": res.inprop,
         "other_out": res.outprop,
         "other_id": res.id,
     })
예제 #8
0
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:MyResource", name)
예제 #9
0
 def __init__(self, name, props):
     CustomResource.__init__(self,
                             "test:index:OtherResource",
                             name,
                             props=props)
예제 #10
0
 def __init__(self, name: str, res: Input[int]) -> None:
     CustomResource.__init__(self, "test:index:ResourceB", name, {
         "other_in": res.inprop,
         "other_out": None
     })
예제 #11
0
 def __init__(self, name, opts=None):
     CustomResource.__init__(self, "test:index:Resource", name, {}, opts)
예제 #12
0
 def __init__(self, name, sum):
     CustomResource.__init__(self, "test:index:SumResource", name, {
         "sum": sum,
     })
예제 #13
0
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:MyResource", name, {"class": MyClass()})
예제 #14
0
 def __init__(self, name, version=None):
     CustomResource.__init__(self, "test:index:MyResource", name, opts=ResourceOptions(version=version))
예제 #15
0
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:MyResource", name, {
         "number": None,
     })
예제 #16
0
 def __init__(self, name, number):
     CustomResource.__init__(self, "test:index:FinalResource", name, {
         "number": number,
     })
예제 #17
0
 def __init__(self, name: str, file_contents: Input[str]) -> None:
     CustomResource.__init__(self, "test:index:FileResource", name,
                             {"contents": file_contents})
예제 #18
0
 def __init__(self, name: str) -> None:
     CustomResource.__init__(self, "test:index:ResourceA", name, {
         "inprop": 777,
         "outprop": None
     })
예제 #19
0
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from pulumi import CustomResource, ResourceOptions

CustomResource("test:read:resource",
               "foo", {
                   "a": "bar",
                   "b": ["c", 4, "d"],
                   "c": {
                       "nest": "baz"
                   }
               },
               opts=ResourceOptions(id="myresourceid", version="0.17.9"))

parent = CustomResource("test:index:MyResource", "foo2")
CustomResource("test:read:resource",
               "foo-with-parent", {
                   "state": "foo",
               },
               opts=ResourceOptions(id="myresourceid2",
                                    version="0.17.9",
                                    parent=parent))
예제 #20
0
 def __init__(self, name, asset):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={"asset": asset})
예제 #21
0
 def __init__(self, name):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={"foo": "bar"})
예제 #22
0
 def __init__(self, name, create_children, opts=None):
     CustomResource.__init__(self, "test:index:Resource", name, {}, opts)
     if create_children is not None:
         create_children(name, self)
예제 #23
0
파일: __main__.py 프로젝트: zerojuls/pulumi
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:Bucket", name)