func NewContentKeyPolicy(ctx *pulumi.Context,
	name string, args *ContentKeyPolicyArgs, opts ...pulumi.ResourceOption) (*ContentKeyPolicy, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}

	if args.MediaServicesAccountName == nil {
		return nil, errors.New("invalid value for required argument 'MediaServicesAccountName'")
	}
	if args.PolicyOptions == nil {
		return nil, errors.New("invalid value for required argument 'PolicyOptions'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	var resource ContentKeyPolicy
	err := ctx.RegisterResource("azure:media/contentKeyPolicy:ContentKeyPolicy", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
// NewContentKeyPolicy registers a new resource with the given unique name, arguments, and options.
NewContentKeyPolicy registers a new resource with the given unique name, arguments, and options.
// NewContentKeyPolicy registers a new resource with the given unique name arguments and options .
func NewContentKeyPolicy(ctx *pulumi.Context,
	name string, args *ContentKeyPolicyArgs, opts ...pulumi.ResourceOption) (*ContentKeyPolicy, error) {
	if args == nil {
		return nil, errors.New("missing one or more required arguments")
	}
	if args.MediaServicesAccountName == nil {
		return nil, errors.New("invalid value for required argument 'MediaServicesAccountName'")
	}
	if args.PolicyOptions == nil {
		return nil, errors.New("invalid value for required argument 'PolicyOptions'")
	}
	if args.ResourceGroupName == nil {
		return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
	}
	var resource ContentKeyPolicy
	err := ctx.RegisterResource("azure:media/contentKeyPolicy:ContentKeyPolicy", name, args, &resource, opts...)
	if err != nil {
		return nil, err
	}
	return &resource, nil
}
func NewContentKeyPolicy ( ctx * pulumi . Context , name string , args * ContentKeyPolicyArgs , opts ... pulumi . ResourceOption ) ( * ContentKeyPolicy , error ) { if args == nil { return nil , errors . New ( " " ) } if args . MediaServicesAccountName == nil { return nil , errors . New ( " " ) } if args . PolicyOptions == nil { return nil , errors . New ( " " ) } if args . ResourceGroupName == nil { return nil , errors . New ( " " ) } var resource ContentKeyPolicy err := ctx . RegisterResource ( " " , name , args , & resource , opts ... ) if err != nil { return nil , err } return & resource , nil }
NewContentKeyPolicy registers a new resource with the given unique name, arguments, and options.
NewContentKeyPolicy registers a new resource with the given unique name arguments and options .