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 applicationsandSign in and read user profilewithin theWindows Azure Active DirectoryAPI.
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#",
});
}
}
Inherited Members
Namespace: Pulumi.AzureAD
Assembly: Pulumi.AzureAD.dll
Syntax
public class ServicePrincipalPassword : CustomResource
Constructors
View SourceServicePrincipalPassword(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 SourceEndDate
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> |
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> |
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> |
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> |
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> |
Value
The Password for this Service Principal.
Declaration
public Output<string> Value { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |