Show / Hide Table of Contents

Class ServicePrincipalPassword

Manages a Password associated with a Service Principal within Azure Active Directory.

NOTE: If you're authenticating using a Service Principal then it must have permissions to both Read and write all applications and Sign in and read user profile within the Windows Azure Active Directory API.

Example Usage

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
public MyStack()
{
    var exampleApplication = new AzureAD.Application("exampleApplication", new AzureAD.ApplicationArgs
    {
        AvailableToOtherTenants = false,
        Homepage = "http://homepage",
        IdentifierUris = 
        {
            "http://uri",
        },
        Oauth2AllowImplicitFlow = true,
        ReplyUrls = 
        {
            "http://replyurl",
        },
    });
    var exampleServicePrincipal = new AzureAD.ServicePrincipal("exampleServicePrincipal", new AzureAD.ServicePrincipalArgs
    {
        ApplicationId = exampleApplication.ApplicationId,
    });
    var exampleServicePrincipalPassword = new AzureAD.ServicePrincipalPassword("exampleServicePrincipalPassword", new AzureAD.ServicePrincipalPasswordArgs
    {
        EndDate = "2099-01-01T01:02:03Z",
        ServicePrincipalId = exampleServicePrincipal.Id,
        Value = "VT=uSgbTanZhyz@%nL9Hpd+Tfay_MRV#",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ServicePrincipalPassword
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AzureAD
Assembly: Pulumi.AzureAD.dll
Syntax
public class ServicePrincipalPassword : CustomResource

Constructors

View Source

ServicePrincipalPassword(String, ServicePrincipalPasswordArgs, CustomResourceOptions)

Create a ServicePrincipalPassword resource with the given unique name, arguments, and options.

Declaration
public ServicePrincipalPassword(string name, ServicePrincipalPasswordArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ServicePrincipalPasswordArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

EndDate

The End Date which the Password is valid until, formatted as a RFC3339 date string (e.g. 2018-01-01T01:02:03Z). Changing this field forces a new resource to be created.

Declaration
public Output<string> EndDate { get; }
Property Value
Type Description
Output<System.String>
View Source

EndDateRelative

A relative duration for which the Password is valid until, for example 240h (10 days) or 2400h30m. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Changing this field forces a new resource to be created.

Declaration
public Output<string> EndDateRelative { get; }
Property Value
Type Description
Output<System.String>
View Source

KeyId

A GUID used to uniquely identify this Key. If not specified a GUID will be created. Changing this field forces a new resource to be created.

Declaration
public Output<string> KeyId { get; }
Property Value
Type Description
Output<System.String>
View Source

ServicePrincipalId

The ID of the Service Principal for which this password should be created. Changing this field forces a new resource to be created.

Declaration
public Output<string> ServicePrincipalId { get; }
Property Value
Type Description
Output<System.String>
View Source

StartDate

The Start Date which the Password is valid from, formatted as a RFC3339 date string (e.g. 2018-01-01T01:02:03Z). If this isn't specified, the current date is used. Changing this field forces a new resource to be created.

Declaration
public Output<string> StartDate { get; }
Property Value
Type Description
Output<System.String>
View Source

Value

The Password for this Service Principal.

Declaration
public Output<string> Value { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ServicePrincipalPasswordState, CustomResourceOptions)

Get an existing ServicePrincipalPassword resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ServicePrincipalPassword Get(string name, Input<string> id, ServicePrincipalPasswordState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ServicePrincipalPasswordState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ServicePrincipalPassword
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.