Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Alibaba Cloud

v3.8.0 published on Monday, Oct 4, 2021 by Pulumi

getService

Using this data source can open Container Registry (CR) service automatically. If the service has been opened, it will return opened.

For information about Container Registry (CR) and how to use it, see What is Container Registry (CR).

NOTE: Available in v1.116.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var open = Output.Create(AliCloud.CR.GetService.InvokeAsync(new AliCloud.CR.GetServiceArgs
        {
            Enable = "On",
            Password = "1111aaaa",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cr"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "On"
		_, err := cr.GetService(ctx, &cr.GetServiceArgs{
			Enable:   &opt0,
			Password: "1111aaaa",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_alicloud as alicloud

open = alicloud.cr.get_service(enable="On",
    password="1111aaaa")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const open = pulumi.output(alicloud.cr.getService({
    enable: "On",
    password: "1111aaaa",
}, { async: true }));

Using getService

function getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
def get_service(enable: Optional[str] = None,
                password: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetServiceResult
func GetService(ctx *Context, args *GetServiceArgs, opts ...InvokeOption) (*GetServiceResult, error)

Note: This function is named GetService in the Go SDK.

public static class GetService {
    public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Password string
The user password. The password must be 8 to 32 characters in length, and must contain at least two of the following character types: letters, special characters, and digits.
Enable string
Setting the value to On to enable the service. If has been enabled, return the result. Valid values: On or Off. Default to Off.
Password string
The user password. The password must be 8 to 32 characters in length, and must contain at least two of the following character types: letters, special characters, and digits.
Enable string
Setting the value to On to enable the service. If has been enabled, return the result. Valid values: On or Off. Default to Off.
password string
The user password. The password must be 8 to 32 characters in length, and must contain at least two of the following character types: letters, special characters, and digits.
enable string
Setting the value to On to enable the service. If has been enabled, return the result. Valid values: On or Off. Default to Off.
password str
The user password. The password must be 8 to 32 characters in length, and must contain at least two of the following character types: letters, special characters, and digits.
enable str
Setting the value to On to enable the service. If has been enabled, return the result. Valid values: On or Off. Default to Off.

getService Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Password string
Status string
The current service enable status.
Enable string
Id string
The provider-assigned unique ID for this managed resource.
Password string
Status string
The current service enable status.
Enable string
id string
The provider-assigned unique ID for this managed resource.
password string
status string
The current service enable status.
enable string
id str
The provider-assigned unique ID for this managed resource.
password str
status str
The current service enable status.
enable str

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.