Esempio n. 1
0
 def __init__(self, name):
     CustomResource.__init__(self,
                             "test:index:MyLargeStringResource",
                             name,
                             props={
                                 "largeStringProp": long_string,
                             })
Esempio n. 2
0
 def __init__(self, name, value):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={
                                 "value": value,
                             })
Esempio n. 3
0
 def __init__(self, name, args, opts=None):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={
                                 **args,
                                 "outprop": None,
                             },
                             opts=opts)
Esempio n. 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,
         })
Esempio n. 5
0
    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})
Esempio n. 6
0
 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"]
                                 }
                             })
Esempio n. 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,
     })
Esempio n. 8
0
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:MyResource", name)
Esempio n. 9
0
 def __init__(self, name, props):
     CustomResource.__init__(self,
                             "test:index:OtherResource",
                             name,
                             props=props)
Esempio n. 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
     })
Esempio n. 11
0
 def __init__(self, name, opts=None):
     CustomResource.__init__(self, "test:index:Resource", name, {}, opts)
Esempio n. 12
0
 def __init__(self, name, sum):
     CustomResource.__init__(self, "test:index:SumResource", name, {
         "sum": sum,
     })
Esempio n. 13
0
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:MyResource", name, {"class": MyClass()})
Esempio n. 14
0
 def __init__(self, name, version=None):
     CustomResource.__init__(self, "test:index:MyResource", name, opts=ResourceOptions(version=version))
Esempio n. 15
0
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:MyResource", name, {
         "number": None,
     })
Esempio n. 16
0
 def __init__(self, name, number):
     CustomResource.__init__(self, "test:index:FinalResource", name, {
         "number": number,
     })
Esempio n. 17
0
 def __init__(self, name: str, file_contents: Input[str]) -> None:
     CustomResource.__init__(self, "test:index:FileResource", name,
                             {"contents": file_contents})
Esempio n. 18
0
 def __init__(self, name: str) -> None:
     CustomResource.__init__(self, "test:index:ResourceA", name, {
         "inprop": 777,
         "outprop": None
     })
Esempio n. 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))
Esempio n. 20
0
 def __init__(self, name, asset):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={"asset": asset})
Esempio n. 21
0
 def __init__(self, name):
     CustomResource.__init__(self,
                             "test:index:MyResource",
                             name,
                             props={"foo": "bar"})
Esempio n. 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)
Esempio n. 23
0
 def __init__(self, name):
     CustomResource.__init__(self, "test:index:Bucket", name)