gcorelabs.CdnResource
Explore with Pulumi AI
Represent CDN resource
Create CdnResource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CdnResource(name: string, args: CdnResourceArgs, opts?: CustomResourceOptions);
@overload
def CdnResource(resource_name: str,
args: CdnResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CdnResource(resource_name: str,
opts: Optional[ResourceOptions] = None,
cname: Optional[str] = None,
origin: Optional[str] = None,
cdn_resource_id: Optional[str] = None,
description: Optional[str] = None,
issue_le_cert: Optional[bool] = None,
options: Optional[CdnResourceOptionsArgs] = None,
active: Optional[bool] = None,
origin_group: Optional[float] = None,
origin_protocol: Optional[str] = None,
secondary_hostnames: Optional[Sequence[str]] = None,
ssl_automated: Optional[bool] = None,
ssl_data: Optional[float] = None,
ssl_enabled: Optional[bool] = None)
func NewCdnResource(ctx *Context, name string, args CdnResourceArgs, opts ...ResourceOption) (*CdnResource, error)
public CdnResource(string name, CdnResourceArgs args, CustomResourceOptions? opts = null)
public CdnResource(String name, CdnResourceArgs args)
public CdnResource(String name, CdnResourceArgs args, CustomResourceOptions options)
type: gcorelabs:CdnResource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CdnResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CdnResourceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CdnResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CdnResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CdnResourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cdnResourceResource = new Gcorelabs.CdnResource("cdnResourceResource", new()
{
Cname = "string",
Origin = "string",
CdnResourceId = "string",
Description = "string",
IssueLeCert = false,
Options = new Gcorelabs.Inputs.CdnResourceOptionsArgs
{
BrowserCacheSettings = new Gcorelabs.Inputs.CdnResourceOptionsBrowserCacheSettingsArgs
{
Enabled = false,
Value = "string",
},
Cors = new Gcorelabs.Inputs.CdnResourceOptionsCorsArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
EdgeCacheSettings = new Gcorelabs.Inputs.CdnResourceOptionsEdgeCacheSettingsArgs
{
CustomValues =
{
{ "string", "string" },
},
Default = "string",
Enabled = false,
Value = "string",
},
GzipOn = new Gcorelabs.Inputs.CdnResourceOptionsGzipOnArgs
{
Value = false,
Enabled = false,
},
HostHeader = new Gcorelabs.Inputs.CdnResourceOptionsHostHeaderArgs
{
Value = "string",
Enabled = false,
},
IgnoreQueryString = new Gcorelabs.Inputs.CdnResourceOptionsIgnoreQueryStringArgs
{
Value = false,
Enabled = false,
},
QueryParamsBlacklist = new Gcorelabs.Inputs.CdnResourceOptionsQueryParamsBlacklistArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
QueryParamsWhitelist = new Gcorelabs.Inputs.CdnResourceOptionsQueryParamsWhitelistArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
RedirectHttpToHttps = new Gcorelabs.Inputs.CdnResourceOptionsRedirectHttpToHttpsArgs
{
Value = false,
Enabled = false,
},
Rewrite = new Gcorelabs.Inputs.CdnResourceOptionsRewriteArgs
{
Body = "string",
Enabled = false,
Flag = "string",
},
Sni = new Gcorelabs.Inputs.CdnResourceOptionsSniArgs
{
CustomHostname = "string",
Enabled = false,
SniType = "string",
},
StaticHeaders = new Gcorelabs.Inputs.CdnResourceOptionsStaticHeadersArgs
{
Value =
{
{ "string", "string" },
},
Enabled = false,
},
StaticRequestHeaders = new Gcorelabs.Inputs.CdnResourceOptionsStaticRequestHeadersArgs
{
Value =
{
{ "string", "string" },
},
Enabled = false,
},
TlsVersions = new Gcorelabs.Inputs.CdnResourceOptionsTlsVersionsArgs
{
Values = new[]
{
"string",
},
Enabled = false,
},
Webp = new Gcorelabs.Inputs.CdnResourceOptionsWebpArgs
{
JpgQuality = 0,
PngQuality = 0,
Enabled = false,
PngLossless = false,
},
Websockets = new Gcorelabs.Inputs.CdnResourceOptionsWebsocketsArgs
{
Value = false,
Enabled = false,
},
},
Active = false,
OriginGroup = 0,
OriginProtocol = "string",
SecondaryHostnames = new[]
{
"string",
},
SslAutomated = false,
SslData = 0,
SslEnabled = false,
});
example, err := gcorelabs.NewCdnResource(ctx, "cdnResourceResource", &gcorelabs.CdnResourceArgs{
Cname: pulumi.String("string"),
Origin: pulumi.String("string"),
CdnResourceId: pulumi.String("string"),
Description: pulumi.String("string"),
IssueLeCert: pulumi.Bool(false),
Options: &gcorelabs.CdnResourceOptionsArgs{
BrowserCacheSettings: &gcorelabs.CdnResourceOptionsBrowserCacheSettingsArgs{
Enabled: pulumi.Bool(false),
Value: pulumi.String("string"),
},
Cors: &gcorelabs.CdnResourceOptionsCorsArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
EdgeCacheSettings: &gcorelabs.CdnResourceOptionsEdgeCacheSettingsArgs{
CustomValues: pulumi.StringMap{
"string": pulumi.String("string"),
},
Default: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Value: pulumi.String("string"),
},
GzipOn: &gcorelabs.CdnResourceOptionsGzipOnArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
HostHeader: &gcorelabs.CdnResourceOptionsHostHeaderArgs{
Value: pulumi.String("string"),
Enabled: pulumi.Bool(false),
},
IgnoreQueryString: &gcorelabs.CdnResourceOptionsIgnoreQueryStringArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
QueryParamsBlacklist: &gcorelabs.CdnResourceOptionsQueryParamsBlacklistArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
QueryParamsWhitelist: &gcorelabs.CdnResourceOptionsQueryParamsWhitelistArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
RedirectHttpToHttps: &gcorelabs.CdnResourceOptionsRedirectHttpToHttpsArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
Rewrite: &gcorelabs.CdnResourceOptionsRewriteArgs{
Body: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Flag: pulumi.String("string"),
},
Sni: &gcorelabs.CdnResourceOptionsSniArgs{
CustomHostname: pulumi.String("string"),
Enabled: pulumi.Bool(false),
SniType: pulumi.String("string"),
},
StaticHeaders: &gcorelabs.CdnResourceOptionsStaticHeadersArgs{
Value: pulumi.StringMap{
"string": pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
StaticRequestHeaders: &gcorelabs.CdnResourceOptionsStaticRequestHeadersArgs{
Value: pulumi.StringMap{
"string": pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
TlsVersions: &gcorelabs.CdnResourceOptionsTlsVersionsArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Enabled: pulumi.Bool(false),
},
Webp: &gcorelabs.CdnResourceOptionsWebpArgs{
JpgQuality: pulumi.Float64(0),
PngQuality: pulumi.Float64(0),
Enabled: pulumi.Bool(false),
PngLossless: pulumi.Bool(false),
},
Websockets: &gcorelabs.CdnResourceOptionsWebsocketsArgs{
Value: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
},
},
Active: pulumi.Bool(false),
OriginGroup: pulumi.Float64(0),
OriginProtocol: pulumi.String("string"),
SecondaryHostnames: pulumi.StringArray{
pulumi.String("string"),
},
SslAutomated: pulumi.Bool(false),
SslData: pulumi.Float64(0),
SslEnabled: pulumi.Bool(false),
})
var cdnResourceResource = new CdnResource("cdnResourceResource", CdnResourceArgs.builder()
.cname("string")
.origin("string")
.cdnResourceId("string")
.description("string")
.issueLeCert(false)
.options(CdnResourceOptionsArgs.builder()
.browserCacheSettings(CdnResourceOptionsBrowserCacheSettingsArgs.builder()
.enabled(false)
.value("string")
.build())
.cors(CdnResourceOptionsCorsArgs.builder()
.values("string")
.enabled(false)
.build())
.edgeCacheSettings(CdnResourceOptionsEdgeCacheSettingsArgs.builder()
.customValues(Map.of("string", "string"))
.default_("string")
.enabled(false)
.value("string")
.build())
.gzipOn(CdnResourceOptionsGzipOnArgs.builder()
.value(false)
.enabled(false)
.build())
.hostHeader(CdnResourceOptionsHostHeaderArgs.builder()
.value("string")
.enabled(false)
.build())
.ignoreQueryString(CdnResourceOptionsIgnoreQueryStringArgs.builder()
.value(false)
.enabled(false)
.build())
.queryParamsBlacklist(CdnResourceOptionsQueryParamsBlacklistArgs.builder()
.values("string")
.enabled(false)
.build())
.queryParamsWhitelist(CdnResourceOptionsQueryParamsWhitelistArgs.builder()
.values("string")
.enabled(false)
.build())
.redirectHttpToHttps(CdnResourceOptionsRedirectHttpToHttpsArgs.builder()
.value(false)
.enabled(false)
.build())
.rewrite(CdnResourceOptionsRewriteArgs.builder()
.body("string")
.enabled(false)
.flag("string")
.build())
.sni(CdnResourceOptionsSniArgs.builder()
.customHostname("string")
.enabled(false)
.sniType("string")
.build())
.staticHeaders(CdnResourceOptionsStaticHeadersArgs.builder()
.value(Map.of("string", "string"))
.enabled(false)
.build())
.staticRequestHeaders(CdnResourceOptionsStaticRequestHeadersArgs.builder()
.value(Map.of("string", "string"))
.enabled(false)
.build())
.tlsVersions(CdnResourceOptionsTlsVersionsArgs.builder()
.values("string")
.enabled(false)
.build())
.webp(CdnResourceOptionsWebpArgs.builder()
.jpgQuality(0)
.pngQuality(0)
.enabled(false)
.pngLossless(false)
.build())
.websockets(CdnResourceOptionsWebsocketsArgs.builder()
.value(false)
.enabled(false)
.build())
.build())
.active(false)
.originGroup(0)
.originProtocol("string")
.secondaryHostnames("string")
.sslAutomated(false)
.sslData(0)
.sslEnabled(false)
.build());
cdn_resource_resource = gcorelabs.CdnResource("cdnResourceResource",
cname="string",
origin="string",
cdn_resource_id="string",
description="string",
issue_le_cert=False,
options={
"browser_cache_settings": {
"enabled": False,
"value": "string",
},
"cors": {
"values": ["string"],
"enabled": False,
},
"edge_cache_settings": {
"custom_values": {
"string": "string",
},
"default": "string",
"enabled": False,
"value": "string",
},
"gzip_on": {
"value": False,
"enabled": False,
},
"host_header": {
"value": "string",
"enabled": False,
},
"ignore_query_string": {
"value": False,
"enabled": False,
},
"query_params_blacklist": {
"values": ["string"],
"enabled": False,
},
"query_params_whitelist": {
"values": ["string"],
"enabled": False,
},
"redirect_http_to_https": {
"value": False,
"enabled": False,
},
"rewrite": {
"body": "string",
"enabled": False,
"flag": "string",
},
"sni": {
"custom_hostname": "string",
"enabled": False,
"sni_type": "string",
},
"static_headers": {
"value": {
"string": "string",
},
"enabled": False,
},
"static_request_headers": {
"value": {
"string": "string",
},
"enabled": False,
},
"tls_versions": {
"values": ["string"],
"enabled": False,
},
"webp": {
"jpg_quality": 0,
"png_quality": 0,
"enabled": False,
"png_lossless": False,
},
"websockets": {
"value": False,
"enabled": False,
},
},
active=False,
origin_group=0,
origin_protocol="string",
secondary_hostnames=["string"],
ssl_automated=False,
ssl_data=0,
ssl_enabled=False)
const cdnResourceResource = new gcorelabs.CdnResource("cdnResourceResource", {
cname: "string",
origin: "string",
cdnResourceId: "string",
description: "string",
issueLeCert: false,
options: {
browserCacheSettings: {
enabled: false,
value: "string",
},
cors: {
values: ["string"],
enabled: false,
},
edgeCacheSettings: {
customValues: {
string: "string",
},
"default": "string",
enabled: false,
value: "string",
},
gzipOn: {
value: false,
enabled: false,
},
hostHeader: {
value: "string",
enabled: false,
},
ignoreQueryString: {
value: false,
enabled: false,
},
queryParamsBlacklist: {
values: ["string"],
enabled: false,
},
queryParamsWhitelist: {
values: ["string"],
enabled: false,
},
redirectHttpToHttps: {
value: false,
enabled: false,
},
rewrite: {
body: "string",
enabled: false,
flag: "string",
},
sni: {
customHostname: "string",
enabled: false,
sniType: "string",
},
staticHeaders: {
value: {
string: "string",
},
enabled: false,
},
staticRequestHeaders: {
value: {
string: "string",
},
enabled: false,
},
tlsVersions: {
values: ["string"],
enabled: false,
},
webp: {
jpgQuality: 0,
pngQuality: 0,
enabled: false,
pngLossless: false,
},
websockets: {
value: false,
enabled: false,
},
},
active: false,
originGroup: 0,
originProtocol: "string",
secondaryHostnames: ["string"],
sslAutomated: false,
sslData: 0,
sslEnabled: false,
});
type: gcorelabs:CdnResource
properties:
active: false
cdnResourceId: string
cname: string
description: string
issueLeCert: false
options:
browserCacheSettings:
enabled: false
value: string
cors:
enabled: false
values:
- string
edgeCacheSettings:
customValues:
string: string
default: string
enabled: false
value: string
gzipOn:
enabled: false
value: false
hostHeader:
enabled: false
value: string
ignoreQueryString:
enabled: false
value: false
queryParamsBlacklist:
enabled: false
values:
- string
queryParamsWhitelist:
enabled: false
values:
- string
redirectHttpToHttps:
enabled: false
value: false
rewrite:
body: string
enabled: false
flag: string
sni:
customHostname: string
enabled: false
sniType: string
staticHeaders:
enabled: false
value:
string: string
staticRequestHeaders:
enabled: false
value:
string: string
tlsVersions:
enabled: false
values:
- string
webp:
enabled: false
jpgQuality: 0
pngLossless: false
pngQuality: 0
websockets:
enabled: false
value: false
origin: string
originGroup: 0
originProtocol: string
secondaryHostnames:
- string
sslAutomated: false
sslData: 0
sslEnabled: false
CdnResource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CdnResource resource accepts the following input properties:
- Cname string
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- Active bool
- The setting allows to enable or disable a CDN Resource
- Cdn
Resource stringId - The ID of this resource.
- Description string
- Custom client description of the resource.
- Issue
Le boolCert - Generate LE certificate.
- Options
Cdn
Resource Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin string
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Group double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- Secondary
Hostnames List<string> - List of additional CNAMEs.
- Ssl
Automated bool - generate LE certificate automatically.
- Ssl
Data double - Specify the SSL Certificate ID which should be used for the CDN Resource.
- Ssl
Enabled bool - Use HTTPS protocol for content delivery.
- Cname string
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- Active bool
- The setting allows to enable or disable a CDN Resource
- Cdn
Resource stringId - The ID of this resource.
- Description string
- Custom client description of the resource.
- Issue
Le boolCert - Generate LE certificate.
- Options
Cdn
Resource Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin string
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Group float64 - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- Secondary
Hostnames []string - List of additional CNAMEs.
- Ssl
Automated bool - generate LE certificate automatically.
- Ssl
Data float64 - Specify the SSL Certificate ID which should be used for the CDN Resource.
- Ssl
Enabled bool - Use HTTPS protocol for content delivery.
- cname String
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- active Boolean
- The setting allows to enable or disable a CDN Resource
- cdn
Resource StringId - The ID of this resource.
- description String
- Custom client description of the resource.
- issue
Le BooleanCert - Generate LE certificate.
- options
Cdn
Resource Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin String
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Group Double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary
Hostnames List<String> - List of additional CNAMEs.
- ssl
Automated Boolean - generate LE certificate automatically.
- ssl
Data Double - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl
Enabled Boolean - Use HTTPS protocol for content delivery.
- cname string
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- active boolean
- The setting allows to enable or disable a CDN Resource
- cdn
Resource stringId - The ID of this resource.
- description string
- Custom client description of the resource.
- issue
Le booleanCert - Generate LE certificate.
- options
Cdn
Resource Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin string
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Group number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary
Hostnames string[] - List of additional CNAMEs.
- ssl
Automated boolean - generate LE certificate automatically.
- ssl
Data number - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl
Enabled boolean - Use HTTPS protocol for content delivery.
- cname str
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- active bool
- The setting allows to enable or disable a CDN Resource
- cdn_
resource_ strid - The ID of this resource.
- description str
- Custom client description of the resource.
- issue_
le_ boolcert - Generate LE certificate.
- options
Cdn
Resource Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin str
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin_
group float - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin_
protocol str - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary_
hostnames Sequence[str] - List of additional CNAMEs.
- ssl_
automated bool - generate LE certificate automatically.
- ssl_
data float - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl_
enabled bool - Use HTTPS protocol for content delivery.
- cname String
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- active Boolean
- The setting allows to enable or disable a CDN Resource
- cdn
Resource StringId - The ID of this resource.
- description String
- Custom client description of the resource.
- issue
Le BooleanCert - Generate LE certificate.
- options Property Map
- Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin String
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Group Number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary
Hostnames List<String> - List of additional CNAMEs.
- ssl
Automated Boolean - generate LE certificate automatically.
- ssl
Data Number - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl
Enabled Boolean - Use HTTPS protocol for content delivery.
Outputs
All input properties are implicitly available as output properties. Additionally, the CdnResource resource produces the following output properties:
Look up Existing CdnResource Resource
Get an existing CdnResource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CdnResourceState, opts?: CustomResourceOptions): CdnResource
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
cdn_resource_id: Optional[str] = None,
cname: Optional[str] = None,
description: Optional[str] = None,
issue_le_cert: Optional[bool] = None,
options: Optional[CdnResourceOptionsArgs] = None,
origin: Optional[str] = None,
origin_group: Optional[float] = None,
origin_protocol: Optional[str] = None,
secondary_hostnames: Optional[Sequence[str]] = None,
ssl_automated: Optional[bool] = None,
ssl_data: Optional[float] = None,
ssl_enabled: Optional[bool] = None,
status: Optional[str] = None) -> CdnResource
func GetCdnResource(ctx *Context, name string, id IDInput, state *CdnResourceState, opts ...ResourceOption) (*CdnResource, error)
public static CdnResource Get(string name, Input<string> id, CdnResourceState? state, CustomResourceOptions? opts = null)
public static CdnResource get(String name, Output<String> id, CdnResourceState state, CustomResourceOptions options)
resources: _: type: gcorelabs:CdnResource get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Active bool
- The setting allows to enable or disable a CDN Resource
- Cdn
Resource stringId - The ID of this resource.
- Cname string
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- Description string
- Custom client description of the resource.
- Issue
Le boolCert - Generate LE certificate.
- Options
Cdn
Resource Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin string
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Group double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- Secondary
Hostnames List<string> - List of additional CNAMEs.
- Ssl
Automated bool - generate LE certificate automatically.
- Ssl
Data double - Specify the SSL Certificate ID which should be used for the CDN Resource.
- Ssl
Enabled bool - Use HTTPS protocol for content delivery.
- Status string
- Status of a CDN resource content availability. Possible values are: Active, Suspended, Processed.
- Active bool
- The setting allows to enable or disable a CDN Resource
- Cdn
Resource stringId - The ID of this resource.
- Cname string
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- Description string
- Custom client description of the resource.
- Issue
Le boolCert - Generate LE certificate.
- Options
Cdn
Resource Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- Origin string
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Group float64 - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- Origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- Secondary
Hostnames []string - List of additional CNAMEs.
- Ssl
Automated bool - generate LE certificate automatically.
- Ssl
Data float64 - Specify the SSL Certificate ID which should be used for the CDN Resource.
- Ssl
Enabled bool - Use HTTPS protocol for content delivery.
- Status string
- Status of a CDN resource content availability. Possible values are: Active, Suspended, Processed.
- active Boolean
- The setting allows to enable or disable a CDN Resource
- cdn
Resource StringId - The ID of this resource.
- cname String
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- description String
- Custom client description of the resource.
- issue
Le BooleanCert - Generate LE certificate.
- options
Cdn
Resource Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin String
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Group Double - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary
Hostnames List<String> - List of additional CNAMEs.
- ssl
Automated Boolean - generate LE certificate automatically.
- ssl
Data Double - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl
Enabled Boolean - Use HTTPS protocol for content delivery.
- status String
- Status of a CDN resource content availability. Possible values are: Active, Suspended, Processed.
- active boolean
- The setting allows to enable or disable a CDN Resource
- cdn
Resource stringId - The ID of this resource.
- cname string
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- description string
- Custom client description of the resource.
- issue
Le booleanCert - Generate LE certificate.
- options
Cdn
Resource Options - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin string
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Group number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol string - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary
Hostnames string[] - List of additional CNAMEs.
- ssl
Automated boolean - generate LE certificate automatically.
- ssl
Data number - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl
Enabled boolean - Use HTTPS protocol for content delivery.
- status string
- Status of a CDN resource content availability. Possible values are: Active, Suspended, Processed.
- active bool
- The setting allows to enable or disable a CDN Resource
- cdn_
resource_ strid - The ID of this resource.
- cname str
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- description str
- Custom client description of the resource.
- issue_
le_ boolcert - Generate LE certificate.
- options
Cdn
Resource Options Args - Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin str
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin_
group float - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin_
protocol str - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary_
hostnames Sequence[str] - List of additional CNAMEs.
- ssl_
automated bool - generate LE certificate automatically.
- ssl_
data float - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl_
enabled bool - Use HTTPS protocol for content delivery.
- status str
- Status of a CDN resource content availability. Possible values are: Active, Suspended, Processed.
- active Boolean
- The setting allows to enable or disable a CDN Resource
- cdn
Resource StringId - The ID of this resource.
- cname String
- A CNAME that will be used to deliver content though a CDN. If you update this field new resource will be created.
- description String
- Custom client description of the resource.
- issue
Le BooleanCert - Generate LE certificate.
- options Property Map
- Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.
- origin String
- A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Group Number - ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
- origin
Protocol String - This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
- secondary
Hostnames List<String> - List of additional CNAMEs.
- ssl
Automated Boolean - generate LE certificate automatically.
- ssl
Data Number - Specify the SSL Certificate ID which should be used for the CDN Resource.
- ssl
Enabled Boolean - Use HTTPS protocol for content delivery.
- status String
- Status of a CDN resource content availability. Possible values are: Active, Suspended, Processed.
Supporting Types
CdnResourceOptions, CdnResourceOptionsArgs
- Browser
Cache CdnSettings Resource Options Browser Cache Settings - Cors
Cdn
Resource Options Cors - Edge
Cache CdnSettings Resource Options Edge Cache Settings - The cache expiration time for CDN servers.
- Gzip
On CdnResource Options Gzip On - Host
Header CdnResource Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- Ignore
Query CdnString Resource Options Ignore Query String - Query
Params CdnBlacklist Resource Options Query Params Blacklist - Query
Params CdnWhitelist Resource Options Query Params Whitelist - Redirect
Http CdnTo Https Resource Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- Rewrite
Cdn
Resource Options Rewrite - Sni
Cdn
Resource Options Sni - Static
Headers CdnResource Options Static Headers - Static
Request CdnHeaders Resource Options Static Request Headers - Tls
Versions CdnResource Options Tls Versions - Webp
Cdn
Resource Options Webp - Websockets
Cdn
Resource Options Websockets
- Browser
Cache CdnSettings Resource Options Browser Cache Settings - Cors
Cdn
Resource Options Cors - Edge
Cache CdnSettings Resource Options Edge Cache Settings - The cache expiration time for CDN servers.
- Gzip
On CdnResource Options Gzip On - Host
Header CdnResource Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- Ignore
Query CdnString Resource Options Ignore Query String - Query
Params CdnBlacklist Resource Options Query Params Blacklist - Query
Params CdnWhitelist Resource Options Query Params Whitelist - Redirect
Http CdnTo Https Resource Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- Rewrite
Cdn
Resource Options Rewrite - Sni
Cdn
Resource Options Sni - Static
Headers CdnResource Options Static Headers - Static
Request CdnHeaders Resource Options Static Request Headers - Tls
Versions CdnResource Options Tls Versions - Webp
Cdn
Resource Options Webp - Websockets
Cdn
Resource Options Websockets
- browser
Cache CdnSettings Resource Options Browser Cache Settings - cors
Cdn
Resource Options Cors - edge
Cache CdnSettings Resource Options Edge Cache Settings - The cache expiration time for CDN servers.
- gzip
On CdnResource Options Gzip On - host
Header CdnResource Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore
Query CdnString Resource Options Ignore Query String - query
Params CdnBlacklist Resource Options Query Params Blacklist - query
Params CdnWhitelist Resource Options Query Params Whitelist - redirect
Http CdnTo Https Resource Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite
Cdn
Resource Options Rewrite - sni
Cdn
Resource Options Sni - static
Headers CdnResource Options Static Headers - static
Request CdnHeaders Resource Options Static Request Headers - tls
Versions CdnResource Options Tls Versions - webp
Cdn
Resource Options Webp - websockets
Cdn
Resource Options Websockets
- browser
Cache CdnSettings Resource Options Browser Cache Settings - cors
Cdn
Resource Options Cors - edge
Cache CdnSettings Resource Options Edge Cache Settings - The cache expiration time for CDN servers.
- gzip
On CdnResource Options Gzip On - host
Header CdnResource Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore
Query CdnString Resource Options Ignore Query String - query
Params CdnBlacklist Resource Options Query Params Blacklist - query
Params CdnWhitelist Resource Options Query Params Whitelist - redirect
Http CdnTo Https Resource Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite
Cdn
Resource Options Rewrite - sni
Cdn
Resource Options Sni - static
Headers CdnResource Options Static Headers - static
Request CdnHeaders Resource Options Static Request Headers - tls
Versions CdnResource Options Tls Versions - webp
Cdn
Resource Options Webp - websockets
Cdn
Resource Options Websockets
- browser_
cache_ Cdnsettings Resource Options Browser Cache Settings - cors
Cdn
Resource Options Cors - edge_
cache_ Cdnsettings Resource Options Edge Cache Settings - The cache expiration time for CDN servers.
- gzip_
on CdnResource Options Gzip On - host_
header CdnResource Options Host Header - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore_
query_ Cdnstring Resource Options Ignore Query String - query_
params_ Cdnblacklist Resource Options Query Params Blacklist - query_
params_ Cdnwhitelist Resource Options Query Params Whitelist - redirect_
http_ Cdnto_ https Resource Options Redirect Http To Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite
Cdn
Resource Options Rewrite - sni
Cdn
Resource Options Sni - static_
headers CdnResource Options Static Headers - static_
request_ Cdnheaders Resource Options Static Request Headers - tls_
versions CdnResource Options Tls Versions - webp
Cdn
Resource Options Webp - websockets
Cdn
Resource Options Websockets
- browser
Cache Property MapSettings - cors Property Map
- edge
Cache Property MapSettings - The cache expiration time for CDN servers.
- gzip
On Property Map - host
Header Property Map - Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.
- ignore
Query Property MapString - query
Params Property MapBlacklist - query
Params Property MapWhitelist - redirect
Http Property MapTo Https - Sets redirect from HTTP protocol to HTTPS for all resource requests.
- rewrite Property Map
- sni Property Map
- static
Headers Property Map - static
Request Property MapHeaders - tls
Versions Property Map - webp Property Map
- websockets Property Map
CdnResourceOptionsBrowserCacheSettings, CdnResourceOptionsBrowserCacheSettingsArgs
CdnResourceOptionsCors, CdnResourceOptionsCorsArgs
CdnResourceOptionsEdgeCacheSettings, CdnResourceOptionsEdgeCacheSettingsArgs
- Custom
Values Dictionary<string, string> - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- Default string
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- Enabled bool
- Value string
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- Custom
Values map[string]string - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- Default string
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- Enabled bool
- Value string
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom
Values Map<String,String> - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default_ String
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled Boolean
- value String
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom
Values {[key: string]: string} - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default string
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled boolean
- value string
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom_
values Mapping[str, str] - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default str
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled bool
- value str
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
- custom
Values Map<String> - Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
- default String
- Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
- enabled Boolean
- value String
- Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
CdnResourceOptionsGzipOn, CdnResourceOptionsGzipOnArgs
CdnResourceOptionsHostHeader, CdnResourceOptionsHostHeaderArgs
CdnResourceOptionsIgnoreQueryString, CdnResourceOptionsIgnoreQueryStringArgs
CdnResourceOptionsQueryParamsBlacklist, CdnResourceOptionsQueryParamsBlacklistArgs
CdnResourceOptionsQueryParamsWhitelist, CdnResourceOptionsQueryParamsWhitelistArgs
CdnResourceOptionsRedirectHttpToHttps, CdnResourceOptionsRedirectHttpToHttpsArgs
CdnResourceOptionsRewrite, CdnResourceOptionsRewriteArgs
CdnResourceOptionsSni, CdnResourceOptionsSniArgs
- Custom
Hostname string - Required to set custom hostname in case sni-type='custom'
- Enabled bool
- Sni
Type string - Available values 'dynamic' or 'custom'
- Custom
Hostname string - Required to set custom hostname in case sni-type='custom'
- Enabled bool
- Sni
Type string - Available values 'dynamic' or 'custom'
- custom
Hostname String - Required to set custom hostname in case sni-type='custom'
- enabled Boolean
- sni
Type String - Available values 'dynamic' or 'custom'
- custom
Hostname string - Required to set custom hostname in case sni-type='custom'
- enabled boolean
- sni
Type string - Available values 'dynamic' or 'custom'
- custom_
hostname str - Required to set custom hostname in case sni-type='custom'
- enabled bool
- sni_
type str - Available values 'dynamic' or 'custom'
- custom
Hostname String - Required to set custom hostname in case sni-type='custom'
- enabled Boolean
- sni
Type String - Available values 'dynamic' or 'custom'
CdnResourceOptionsStaticHeaders, CdnResourceOptionsStaticHeadersArgs
CdnResourceOptionsStaticRequestHeaders, CdnResourceOptionsStaticRequestHeadersArgs
CdnResourceOptionsTlsVersions, CdnResourceOptionsTlsVersionsArgs
CdnResourceOptionsWebp, CdnResourceOptionsWebpArgs
- Jpg
Quality double - Png
Quality double - Enabled bool
- Png
Lossless bool
- Jpg
Quality float64 - Png
Quality float64 - Enabled bool
- Png
Lossless bool
- jpg
Quality Double - png
Quality Double - enabled Boolean
- png
Lossless Boolean
- jpg
Quality number - png
Quality number - enabled boolean
- png
Lossless boolean
- jpg_
quality float - png_
quality float - enabled bool
- png_
lossless bool
- jpg
Quality Number - png
Quality Number - enabled Boolean
- png
Lossless Boolean
CdnResourceOptionsWebsockets, CdnResourceOptionsWebsocketsArgs
Package Details
- Repository
- gcorelabs g-core/terraform-provider-gcorelabs
- License
- Notes
- This Pulumi package is based on the
gcorelabs
Terraform Provider.